def restore_state(object, state):
    """ Restore the state of an object

    Parameters
    ----------
    object: Object which should be restored
    state: State from settings

    Returns
    -------

    """
    if state:
        object.restoreState(state)
