Gui: refactor tree view

* Major refactor of tree view to support external linking.

* Item update and selection change are now mostly handled by timer for
  performance improvement.

* Major change to drag and drop for better support of switching between
  copy, move and replace action, and auto adjustment of placement and
  relative link.

* Add second column for user changable object description.

* Unified tree view options and action into command group
  Std_TreeViewActions.

* Modified object search function to find external objects using
  Expression syntax.
This commit is contained in:
Zheng, Lei
2019-07-11 13:27:54 +08:00
committed by wmayer
parent 2bd4795e80
commit c18bf11821
9 changed files with 4574 additions and 1164 deletions

View File

@@ -204,13 +204,21 @@ void ViewProviderDocumentObject::hide(void)
void ViewProviderDocumentObject::show(void)
{
if(TreeWidget::isObjectShowable(getObject()))
ViewProvider::show();
else {
Visibility.setValue(false);
if(getObject())
getObject()->Visibility.setValue(false);
return;
}
// use this bit to check whether 'Visibility' must be adjusted
if (Visibility.testStatus(App::Property::User2) == false) {
Visibility.setStatus(App::Property::User2, true);
Visibility.setValue(true);
Visibility.setStatus(App::Property::User2, false);
}
ViewProvider::show();
}
void ViewProviderDocumentObject::updateView()