Proper support of completing an edit in the middel of an expression.
Also support 'noProperty' mode in the completer, where no completion is
offered for property names. This will be used by tree view object
search.
There are lots of dependency inversion problem in TechDraw, the ideal
organization should let a child depend on project group, instead of the
other way round, e.g. using PropertyLinkListHidden.
This patch is just a cheap fix. The problem occurs when the user uses
any expression to update properties like Scale in a projection group.
The Scale property will be changed on recomputing projection group,
which triggers children update, but since the group depends on the
children, the children has already been recomputed.
ViewProviderAttachExtension::extensionMergeOverlayIcons() calls
AttachExtension::positionBySupport() which will always touch the
extended object. This may cause recomputation problems, e.g a datum
that is always touched, because normal recomputation trigger tree
view update by a timer, tree view refreshes the icon, datum gets
touched again.
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.
- in SelectionSingleton::setVisible, if the selection changes during
loop, a crash may occur.
- in QGraphicsScene, hiding an item changes its selected status.