Opened 6 years ago

Closed 6 years ago

#2776 closed enhancement (fixed)

would like Settings.revert()

Reported by: Greg Couch Owned by: pett
Priority: major Milestone:
Component: Core Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Would like a core.Settings revert method that would revert the settings that are explicitly saved to the saved values.

How about:

def revert(self):
    for name in self.EXPLICIT_SAVE:
        self._cur_settings[name] = ConfigFile.__getattr__(self, name)

Change History (2)

comment:1 by pett, 6 years ago

Status: assignedaccepted

Perhaps. We can discuss on Monday. The interface terminology for this is 'restore', not 'revert', so if it gets implemented, that would be the name.

comment:2 by pett, 6 years ago

Resolution: fixed
Status: acceptedclosed

Added 'reset' and 'restore' methods to settings, that fire the appropriate triggers.

Note: See TracTickets for help on using tickets.