The motivation of this patch is to make it easy for Python workbench
cache its own icons (possibly generated at runtime), saving the trouble
of pre-compiling the icons as binary resources.
* Gui.addIcon() now support a third argument as format. Default format
is 'XPM' as before. The intention is to allow user to cache other
format of icon image, like 'PNG'.
* ViewProviderPythonFeature::getIcon() now checks if the given string
argument is a key to a cached icon.
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.
The link support means that an object can now appear in more than one
places, and even inside a document different from its own. This patch
adds support for in-place editing, meaning that the object can be edited
at correct place regardless where it is.
See [here](https://git.io/fjPIk) for more info about the relavent APIs.
This patch includes two example of modifications to support in-place
editing. One is the ViewProviderDragger, which simply adds the dragger
node to editing root node by calling
View3DInventorViewer::setupEditingRoot(dragger). The other much more
complex one is ViewProviderSketch which calls setupEditingRoot(0) to
transfer all its children node into editing root. ViewProviderSketch
also includes various modifications to command invocation, because we
can no longer assume the active document is the owner of the editing
object.
This patch also includes necessary modification of the 'Show' module to
support in-place editing.
See bug description:
https://bitbucket.org/Coin3D/coin/pull-requests/119/fix-sochildlist-auditing/diff
Because of path based rendering (SoFCPathAnnotation) in mouse over
highlight, this bug causes crash more frequently here comparing to
upstream.
All C++ calling of SoGroup::removeAllChildren() is replaced by
Gui::coinRemoveAllChildren(), and python code is fixed by monkey
patching SoGroup.removeAllChildren() in FreeCADGuiInit.py.
Before that (e.g. on MacBook Pro) it was very hard to see the microscopic selection-circle hidden behind much bigger cursor arrow when trying to snap e.g. a line to some vertex. Now this setting can be used for such displays to increase the marker size and make it clearly visible behind the cursor.
The already existing "sketcher marker size" property is intended to be used for sketcher only, so it's not suitable for global setup of all the markers' sizes uniformly...
make filtering of modal dialogs working with Qt5
save/restore filter flags
don't filter events for File > Export
when using showPreferences don't show wait cursor