+
+ QObject* aObj = myWorkshop->objectBrowser()->parent();
+ QDockWidget* aObjDoc = dynamic_cast<QDockWidget*>(aObj);
+ if (aObjDoc) {
+ aObjDoc->setVisible(false);
+ myWorkshop->objectBrowser()->setVisible(false);
+ QAction* aViewAct = aObjDoc->toggleViewAction();
+ aViewAct->setEnabled(false);
+ }
+
+ // the active operation should be stopped for the next activation.
+ // There should not be active operation and visualized preview.
+ // Abort operation should be performed before the selection's remove
+ // because the displayed objects should be removed from the viewer, but
+ // the AIS context is obtained from the selector.
+ ModuleBase_Operation* anOperation = myWorkshop->operationMgr()->currentOperation();
+ if (anOperation)
+ anOperation->abort();
+
+ // Delete selector because it has to be redefined on next activation
+ if (mySelector) {
+ myProxyViewer->setSelector(0);
+ delete mySelector;
+ mySelector = 0;
+ }
+