The function PropertyEditor::recomputeDocument() accepts a pointer to App::Document that is passed by the calling instance closeTransaction().
Since this is the active document there is no need for PropertyEditor::recomputeDocument() to ignore the argument and determine the active document again.
* Gui: fix PropertyView 'Add property' action
* Gui: fix property view font color for linked property
* Gui: improve PropertyEditor refresh
* Gui: show real property name in property view tool tip
* Gui: improve property view tool tip
* Gui: fix auto recompute in property view
* Gui: remove duplicated PropertyModel signal of dataChanged()
* Gui: fix property view update on property change
Including changes in document properties
* Gui: fix transaction closing on property editor change
On editing row removal and on model reset.
* Gui: fix property view auto expansion of previous selected item
* Gui: improve property editor navigation using tab/shift+tab
New property status bit 'CopyOnChange' is added for any document object
to publish any property as a 'Configuration' option. When Link is
linked to any object with such property, it will duplicate those
properties and added it Link itself as dynamic properties. If the user
changes any of these dynamic properties, the Link will auto copy the
linked to object and apply the new configuration to it.
The Link has a new property 'LinkCopyOnChange' to allow user to
enable/disable this feature.
Spreadsheet's 'Configuration Table' feature will publish its
configuration property with 'CopyOnChange'.
Currently, once the linked object is copied, it will be independent with
the original object. There is no mechanism to auto sync changes back to
the copy.
+ add function to cleanup units and quantities in debug build
+ fix reference leak in PropertyVector::getPyPathValue()
+ fix reference leak in PropertyPlacement::getPyPathValue()
+ in InterpreterSingleton::init() use a static std::vector<wchar_t*> instead of a C array
to free memory at program end
+ in MainWindow::closeEvent() explicitly delete all task watchers
+ in ReportOutputObserver constructor pass parent to QObject
+ in PropertyEditor destructor explicitly delete QItemEditorFactory
* handle all exceptions in Application::onLastWindowClosed because this method can be (indirectly) called from ~BaseView and would otherwise trigger std::terminate()
* handle exceptions in PropertyEditor::closeTransaction() because when recomputing a document while closing it leaves the editor in a bad state
The actual cause of crash in previous commit 80f70ff6 is
Document::recompute() allows aborting using Base::Sequence, which
uses QApplication::processEvent() to catch 'ESC' key press. This local
event loop causes premature deletion of the editor widget.
This patch moves handling of closeEditor before calling recompute().
Crash stack trace
https://forum.freecadweb.org/viewtopic.php?f=8&t=37757&e=1&view=unread#p327901
It appears to by caused by handling QAbstractItemDelegate::closeEditor
signal twice. Once inside PropertyItemDelegate::editorClosed via slot
connection where the editor is closed/destroyed, the other in
PropertyEditor::closeEditor() which tries to access the destroyed
editor.
This patch removes handling of closeEditor signal in
PropertyItemDelegate.
* Display property from linked object, colored green,
* Change DlgPropertyLink to support external linking and sub-object
selection
* Improve large selection performance by using a timer
* Improve TAB key behavior in property editor
* Add context menu to show hidden properties, change property status,
set expression on any and property, and add/remove dynamic properties
* Optimize expression completer model construction, as the original
implementation gets prohibitively slow for moderate number of objects.