예제 #1
0
파일: logs.py 프로젝트: kynikos/outspline
    def _update_context_menu(self):
        if core_api.preview_undo_tree(self.filename):
            self.undo.Enable()
        else:
            self.undo.Enable(False)

        if core_api.preview_redo_tree(self.filename):
            self.redo.Enable()
        else:
            self.redo.Enable(False)
예제 #2
0
파일: logs.py 프로젝트: mikpim01/outspline
    def _update_context_menu(self):
        if core_api.preview_undo_tree(self.filename):
            self.undo.Enable()
        else:
            self.undo.Enable(False)

        if core_api.preview_redo_tree(self.filename):
            self.redo.Enable()
        else:
            self.redo.Enable(False)
예제 #3
0
파일: tree.py 프로젝트: xguse/outspline
    def update(self):
        if core_api.preview_undo_tree(self.filename):
            self.undo.Enable()
        else:
            self.undo.Enable(False)

        if core_api.preview_redo_tree(self.filename):
            self.redo.Enable()
        else:
            self.redo.Enable(False)

        if core_api.check_pending_changes(self.filename):
            self.save.Enable()
        else:
            self.save.Enable(False)
예제 #4
0
    def update(self):
        if core_api.preview_undo_tree(self.filename):
            self.undo.Enable()
        else:
            self.undo.Enable(False)

        if core_api.preview_redo_tree(self.filename):
            self.redo.Enable()
        else:
            self.redo.Enable(False)

        if core_api.check_pending_changes(self.filename):
            self.save.Enable()
        else:
            self.save.Enable(False)
예제 #5
0
파일: tree.py 프로젝트: xguse/outspline
    def undo(self, no_confirm=False):
        if core_api.block_databases():
            read = core_api.preview_undo_tree(self.filename)

            if read:
                for id_ in read:
                    item = editor.Editor.make_tabid(self.filename, id_)

                    if item in editor.tabs and not editor.tabs[item].close(
                                    ask='quiet' if no_confirm else 'discard'):
                        break
                else:
                    core_api.undo_tree(self.filename)
                    self.dbhistory.refresh()
                    undo_tree_event.signal(filename=self.filename)

            core_api.release_databases()
예제 #6
0
    def undo(self, no_confirm=False):
        if core_api.block_databases():
            read = core_api.preview_undo_tree(self.filename)

            if read:
                for id_ in read:
                    item = editor.Editor.make_tabid(self.filename, id_)

                    if item in editor.tabs and not editor.tabs[item].close(
                                    ask='quiet' if no_confirm else 'discard'):
                        break
                else:
                    core_api.undo_tree(self.filename)
                    self.dbhistory.refresh()
                    undo_tree_event.signal(filename=self.filename)

            core_api.release_databases()