Ejemplo n.º 1
0
    def apply_changes(self):
        ul = UndoList().describe("Edit Plot Properties")
        for tab in self.tabs:
            ui = UndoList()
            tab.check_out(undolist=ui)
            ul.append(ui.simplify())


        ul = ul.simplify(preserve_list=True)
        
        if len(ul) > 0:
            uwrap.emit_last(self.plot, "plot-changed", undolist=ul)            
        else:
            ul = NullUndo()
            
        self.app.project.journal.add_undo(ul)
Ejemplo n.º 2
0
    def apply_changes(self):
        """ Apply all changes in all tabs.

        The method calls 'check_in' of every tab in the dialog's
        notebook. The created undolists are unified into a single
        undolist, which is appended to the project's journal.
        """
        
        ul = UndoList().describe("Edit Plot Properties")

        for tab in self.tabdict.itervalues():
            ui = UndoList()            
            tab.check_out(undolist=ui)
            ul.append(ui.simplify())

        ul = ul.simplify(preserve_list=True)

        if len(ul) > 0:
            uwrap.emit_last(self.plot, "changed", undolist=ul)            
        else:
            ul = NullUndo()
            
        globals.app.project.journal.add_undo(ul)