FreeCAD: staging 6732ca53
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
Zheng, Lei | Zheng, Lei | staging | 2019-07-11 02:00:57 | staging bb52ff1d |
Changeset | Gui: Application/Document/MainWindow changes following App namespace Application: * signalNewDocument, check the extra argument, isMainDoc, the decide whether to create view of the new document. This is so that external linked document can be opened in background without crowding the tab list. * slotDeleteDocument, calls Document::beforeDelete() * slotActiveDocument, creates view if none, because external document is now opened without view. * onLastWindowClosed(), switch to next active document, and creates view if none. * send(Has)MsgToFocusView(), new API to send message to the active view in focus. This is to solve the ambiguity of things like pressing delete key, copy, paste handling when the active new is not in focus. For example, when spread sheet view is active, delete/copy/paste handling should be different when the focus on the spread sheet view or focus on tree view. * tryClose(), delegate to MainWindow for close confirmation * reopen(), new API to reload a partial document in full Document/DocumentP: * _CoinMap, new internal map for quick access view provider from its root node. * slotNewObject, modified to support view provider override from App::FeaturePython, through new API DocumentObject::getViewProviderNameOverride(). * slotDeletedObject/slotTransactionRemove, improve handling of geo group children rebuild * slotSkipRecompute, add special handling of document with skip recompute. Some command cannot work when skip recompute is active. For example, sketcher command will check if recompute is successful on many commands, and will undo if not. New 'PartialCompute' flag is added to allow recompute only the editing object and all its dependencies if 'SkipRecompute' is active. * slotTouchedObject, new signal handling of manually touched object. * setModified(), do nothing if already modified. This is a critical performance improvement, because marking tab window as modified turns out to be a relatively expensive operation, and will cause massive slow down if calling it on every property change. * getViewProviderByPathFromHead/getViewProvidersByPath(), new APIs to obtain view provider(s) from coin SoPath. * save/saveAll/saveCopy, modified to support external document saving. * Save/RestoreDocFile(), save and restore tree item recursive expansion status. * slotFinishRestoreObject(), handle new signal signalFinishRestoreObject(), unifies postprocessing in restore and import operation. * createView/setActiveView(), add support of delayed view creations * canClose(), delegate to MainWindows to ask for confirmation * undo/redo(), support grouped transaction undo/redo. Transactions may be grouped by the same transaction ID if they are triggered by a single operation but involves objects from multiple documents. * toggleInSceneGraph(), new API to add or remove root node from or to scenegraph without deleting the view object. MainWindow: * Update command status using a single shot timer instead of periodical one. * Improve message display is status bar. Give error and warning message higher priority (using QStatusBar::showMessage()) than normal status message (using actionLabel), reversed from original implementation. * confirmSave(), new API to check for modification, and ask user to save the document before closing. The confirmation dialog allows user to apply the answer to all document for convenience. * saveAll(), new API to save all document with correct ordering in case of external linking. * createMimeDataFromSelection/insertFromMimeData(), support copy paste object with external linking. A new dialog DlgObjectSelection is used to let user select exactly which object to export. CommandDoc/CommandWindow: * Related changes to object delete, document import, export, and save. |
|||
mod - src/Gui/Application.cpp | Diff File | |||
mod - src/Gui/Application.h | Diff File | |||
mod - src/Gui/ApplicationPy.cpp | Diff File | |||
mod - src/Gui/CMakeLists.txt | Diff File | |||
mod - src/Gui/CommandDoc.cpp | Diff File | |||
mod - src/Gui/CommandWindow.cpp | Diff File | |||
add - src/Gui/DlgObjectSelection.cpp | Diff File | |||
add - src/Gui/DlgObjectSelection.h | Diff File | |||
add - src/Gui/DlgObjectSelection.ui | Diff File | |||
mod - src/Gui/DlgSettingsDocument.ui | Diff File | |||
mod - src/Gui/DlgSettingsDocumentImp.cpp | Diff File | |||
mod - src/Gui/Document.cpp | Diff File | |||
mod - src/Gui/Document.h | Diff File | |||
mod - src/Gui/DocumentPy.xml | Diff File | |||
mod - src/Gui/DocumentPyImp.cpp | Diff File | |||
mod - src/Gui/InventorAll.h | Diff File | |||
mod - src/Gui/MDIView.cpp | Diff File | |||
mod - src/Gui/MainWindow.cpp | Diff File | |||
mod - src/Gui/MainWindow.h | Diff File | |||
mod - src/Gui/PreCompiled.h | Diff File | |||
mod - src/Gui/ProgressBar.cpp | Diff File | |||
mod - src/Gui/ProgressBar.h | Diff File | |||
mod - src/Gui/ProgressDialog.cpp | Diff File | |||
mod - src/Gui/ProgressDialog.h | Diff File | |||
mod - src/Gui/ReportView.cpp | Diff File | |||
mod - src/Gui/ReportView.h | Diff File | |||
mod - src/Gui/View3DInventor.cpp | Diff File |