Gui: Command API changes

* invoke(), distinguish between command triggering source. Also add
  support of auto transaction using App::AutoTransaction. Now all
  command will support undo/redo by default.

* setupCheckable(), a helper function to Improve support of
  PythonGroupCommand

* getObjectCmd(), helper function to output Python command to refer to
  an object without ambiguity. Because with introduction of external
  linking, an object can no longer be safely referred through the
  current active document.

* Support auto MacroManager command logger. For commands that does not
  log any output to MacroManager, a log entry of 'Gui.runCommand()' will
  be auto generated.

* Support linked object in copyVisual()

* Modified do/runCommand() to print calling file and line number.

* Add various helper macros for run command involving a document or
  object.
This commit is contained in:
Zheng, Lei
2019-07-07 12:00:13 +08:00
committed by wmayer
parent f5d92fdae7
commit b1c0de8dae
8 changed files with 678 additions and 93 deletions

View File

@@ -142,7 +142,7 @@ StdCmdCloseActiveWindow::StdCmdCloseActiveWindow()
// collide with this shortcut. Thus the shortcut of QMdiSubWindow will be
// reset in MainWindow::addWindow() (#0002631)
sAccel = keySequenceToAccel(QKeySequence::Close);
eType = 0;
eType = NoTransaction;
}
void StdCmdCloseActiveWindow::activated(int iMsg)