1 // Copyright (C) 2014-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "XGUI_FacesPanel.h"
21 #include "XGUI_ObjectsBrowser.h"
22 #include "XGUI_SelectionMgr.h"
23 #include "XGUI_Selection.h"
24 #include "XGUI_Tools.h"
25 #include "XGUI_Workshop.h"
26 #include "XGUI_Displayer.h"
27 #include "XGUI_ViewerProxy.h"
29 #include <ModuleBase_IModule.h>
30 #include <ModuleBase_ISelection.h>
31 #include <ModuleBase_IWorkshop.h>
32 #include <ModuleBase_IViewer.h>
33 #include <ModuleBase_ListView.h>
34 #include <ModuleBase_ResultPrs.h>
35 #include <ModuleBase_Tools.h>
36 #include <ModuleBase_ViewerPrs.h>
37 #include <ModuleBase_SelectionFilterType.h>
39 #include <Config_PropManager.h>
40 #include <Events_Loop.h>
41 #include <GeomAlgoAPI_CompoundBuilder.h>
42 #include <GeomAPI_Shape.h>
44 #include <ModelAPI_Events.h>
45 #include <ModelAPI_AttributeSelectionList.h>
49 #include <QFocusEvent>
50 #include <QGridLayout>
51 #include <QListWidget>
52 #include <QMainWindow>
54 static const int LayoutMargin = 3;
56 //********************************************************************
57 bool getGroup(ModuleBase_ViewerPrsPtr thePrs, ResultGroupPtr& theResGroup,
58 FeaturePtr& theGroupFeature)
60 ObjectPtr anObject = thePrs->object();
64 theResGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(anObject);
65 if (theResGroup.get()) {
66 theGroupFeature = ModelAPI_Feature::feature(theResGroup);
69 theGroupFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(anObject);
70 if (theGroupFeature.get())
71 theResGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(theGroupFeature->firstResult());
76 //********************************************************************
77 XGUI_FacesPanel::XGUI_FacesPanel(QWidget* theParent, XGUI_Workshop* theWorkshop)
78 : QDockWidget(theParent), myIsActive(false), myWorkshop(theWorkshop)
80 setWindowTitle(tr("Hide Faces"));
81 QAction* aViewAct = toggleViewAction();
82 setStyleSheet("::title { position: relative; padding-left: 5px; text-align: left center }");
84 QWidget* aContent = new QWidget(this);
85 QGridLayout* aMainLayout = new QGridLayout(aContent);
86 aMainLayout->setContentsMargins(LayoutMargin, LayoutMargin, LayoutMargin, LayoutMargin);
89 myHiddenOrTransparent = new QCheckBox(tr("Transparent"), aContent);
90 connect(myHiddenOrTransparent, SIGNAL(toggled(bool)), SLOT(onTransparencyChanged()));
92 myListView = new ModuleBase_ListView(aContent, "", "Hidden/transparent faces in 3D view");
93 connect(myListView, SIGNAL(deleteActionClicked()), SLOT(onDeleteItem()));
95 aMainLayout->addWidget(myHiddenOrTransparent, 0, 0);
96 aMainLayout->addWidget(myListView->getControl(), 1, 0);
98 myListView->getControl()->setFocusPolicy(Qt::StrongFocus);
99 myListView->getControl()->viewport()->installEventFilter(this);
102 //********************************************************************
103 void XGUI_FacesPanel::reset(const bool isToFlushRedisplay)
105 if (myLastItemIndex == 0) // do nothing because there was no activity in the pane after reset
108 std::map<ObjectPtr, TopoDS_ListOfShape> anObjectToShapes;
109 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) > anObjectToPrs;
110 QMap<int, std::shared_ptr<ModuleBase_ViewerPrs> >::const_iterator aIt;
111 for (aIt = myItems.cbegin(); aIt != myItems.cend(); aIt++) {
112 getObjectsMapFromPrs(aIt.value(), anObjectToShapes, anObjectToPrs);
115 std::set<ObjectPtr> aObjects;
116 TopoDS_ListOfShape anEmpty;
117 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs)>::const_iterator aPrsIt;
118 for (aPrsIt = anObjectToPrs.cbegin(); aPrsIt != anObjectToPrs.cend(); aPrsIt++) {
119 aObjects.insert(aPrsIt->first);
120 aPrsIt->second->setSubShapeHidden(anEmpty);
122 std::set<std::shared_ptr<ModelAPI_Object> >::const_iterator aGrpIt;
123 for (aGrpIt = myHiddenGroups.cbegin(); aGrpIt != myHiddenGroups.cend(); aGrpIt++)
124 (*aGrpIt)->setDisplayed(true);
125 myHiddenGroups.clear();
127 if (redisplayObjects(aObjects))
130 // clear internal containers
131 myListView->getControl()->clear();
133 updateProcessedObjects(myItems, myItemObjects);
134 myLastItemIndex = 0; // it should be after redisplay as flag used in customize
135 myHiddenObjects.clear();
138 //********************************************************************
139 bool XGUI_FacesPanel::isEmpty() const
141 return myItems.size() == 0;
144 //********************************************************************
145 void XGUI_FacesPanel::selectionModes(QIntList& theModes)
147 theModes.append(TopAbs_FACE);
150 //********************************************************************
151 void XGUI_FacesPanel::selectionFilters(SelectMgr_ListOfFilter& theSelectionFilters)
153 ModuleBase_IModule* aModule = myWorkshop->module();
154 QIntList aModuleSelectionFilters = myWorkshop->module()->selectionFilters();
156 // The global filter makes problem for groups selection when any operation is launched
157 // theSelectionFilters.Append(aModule->selectionFilter(SF_GlobalFilter));
158 theSelectionFilters.Append(aModule->selectionFilter(SF_FilterInfinite));
159 theSelectionFilters.Append(aModule->selectionFilter(SF_ResultGroupNameFilter));
162 //********************************************************************
163 bool XGUI_FacesPanel::eventFilter(QObject* theObject, QEvent *theEvent)
165 QWidget* aWidget = qobject_cast<QWidget*>(theObject);
166 if (theEvent->type() == QEvent::MouseButtonRelease)
168 if (myListView->getControl()->viewport() == aWidget)
169 setActivePanel(true);
171 // pass the event on to the parent class
172 return QObject::eventFilter(theObject, theEvent);
175 //********************************************************************
176 void XGUI_FacesPanel::setActivePanel(const bool theIsActive)
178 if (myIsActive == theIsActive)
181 ModuleBase_Tools::setShadowEffect(myListView->getControl(), theIsActive);
182 myIsActive = theIsActive;
186 // selection should be cleared after emit of signal to do not process selection change
187 // event by the previous selector
188 // the selection is cleared by activating selection control
189 myWorkshop->selector()->clearSelection();
195 //********************************************************************
196 bool XGUI_FacesPanel::useTransparency() const
198 return myHiddenOrTransparent->isChecked();
201 //********************************************************************
202 double XGUI_FacesPanel::transparency() const
204 return useTransparency() ?
205 Config_PropManager::real("Visualization", "hidden_face_transparency") : 1;
209 //********************************************************************
210 void XGUI_FacesPanel::restoreObjects(const std::set<ObjectPtr>& theHiddenObjects)
212 std::set<int> anIndicesToBeRemoved;
213 for (QMap<int, ModuleBase_ViewerPrsPtr>::const_iterator anItemsIt = myItems.begin();
214 anItemsIt != myItems.end(); anItemsIt++)
216 ModuleBase_ViewerPrsPtr aPrs = anItemsIt.value();
217 ObjectPtr anObject = aPrs->object();
218 if (theHiddenObjects.find(anObject) == theHiddenObjects.end()) // not found
220 anIndicesToBeRemoved.insert(anItemsIt.key());
223 // remove from myItes container
224 for (std::set<int>::const_iterator aToBeRemovedIt = anIndicesToBeRemoved.begin();
225 aToBeRemovedIt != anIndicesToBeRemoved.end(); aToBeRemovedIt++)
227 myItems.remove(*aToBeRemovedIt);
229 if (!anIndicesToBeRemoved.empty()) // means that myItems has been changed
230 updateProcessedObjects(myItems, myItemObjects);
231 myListView->removeItems(anIndicesToBeRemoved);
233 // remove from container of hidden objects
234 for (std::set<ObjectPtr>::const_iterator aHiddenIt = theHiddenObjects.begin();
235 aHiddenIt != theHiddenObjects.end(); aHiddenIt++)
237 if (myHiddenObjects.find(*aHiddenIt) != myHiddenObjects.end()) /// found objects
238 myHiddenObjects.erase(*aHiddenIt);
242 //********************************************************************
243 bool XGUI_FacesPanel::processAction(ModuleBase_ActionType theActionType)
245 switch (theActionType) {
247 // return processEnter();
249 setActivePanel(false);
252 return processDelete();
260 //********************************************************************
261 void XGUI_FacesPanel::getObjectsMapFromResult(ResultGroupPtr theResGroup,
262 FeaturePtr theGroupFeature,
263 std::map<ObjectPtr, TopoDS_ListOfShape>& theObjectToShapes,
264 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) >& theObjectToPrs)
266 XGUI_Displayer* aDisplayer = myWorkshop->displayer();
267 // Process a grouip result
268 AttributeSelectionListPtr aSelectionList = theGroupFeature->selectionList("group_list");
270 for (int i = 0; i < aSelectionList->size(); i++) {
271 AttributeSelectionPtr aSelection = aSelectionList->value(i);
272 ResultPtr aRes = aSelection->context();
273 aPrs = aDisplayer->getAISObject(aRes);
275 Handle(ModuleBase_ResultPrs) aResultPrs = Handle(ModuleBase_ResultPrs)::DownCast(
276 aPrs->impl<Handle(AIS_InteractiveObject)>());
277 if (!aResultPrs.IsNull()) {
278 GeomShapePtr aShape = aSelection->value();
279 if (theObjectToShapes.find(aRes) != theObjectToShapes.end())
280 theObjectToShapes.at(aRes).Append(aShape->impl<TopoDS_Shape>());
282 TopoDS_ListOfShape aListOfShapes;
283 aListOfShapes.Append(aShape->impl<TopoDS_Shape>());
284 theObjectToShapes[aRes] = aListOfShapes;
285 theObjectToPrs[aRes] = aResultPrs;
292 //********************************************************************
293 void objectsMapFromPrs(ModuleBase_ViewerPrsPtr thePrs,
294 std::map<ObjectPtr, TopoDS_ListOfShape>& theObjectToShapes,
295 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) >& theObjectToPrs)
297 ObjectPtr anObject = thePrs->object();
302 Handle(ModuleBase_ResultPrs) aResultPrs = Handle(ModuleBase_ResultPrs)::DownCast(
303 thePrs->interactive());
304 if (aResultPrs.IsNull())
307 if (theObjectToShapes.find(anObject) != theObjectToShapes.end())
308 theObjectToShapes.at(anObject).Append(ModuleBase_Tools::getSelectedShape(thePrs));
310 TopoDS_ListOfShape aListOfShapes;
311 aListOfShapes.Append(ModuleBase_Tools::getSelectedShape(thePrs));
312 theObjectToShapes[anObject] = aListOfShapes;
313 theObjectToPrs[anObject] = aResultPrs;
317 //********************************************************************
318 void XGUI_FacesPanel::getObjectsMapFromPrs(ModuleBase_ViewerPrsPtr thePrs,
319 std::map<ObjectPtr, TopoDS_ListOfShape>& theObjectToShapes,
320 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) >& theObjectToPrs)
322 ResultGroupPtr aResGroup;
323 FeaturePtr aGroupFeature;
324 if (getGroup(thePrs, aResGroup, aGroupFeature))
325 getObjectsMapFromResult(aResGroup, aGroupFeature, theObjectToShapes, theObjectToPrs);
327 objectsMapFromPrs(thePrs, theObjectToShapes, theObjectToPrs);
330 //********************************************************************
331 void XGUI_FacesPanel::processSelection()
333 QList<ModuleBase_ViewerPrsPtr> aSelected =
334 myWorkshop->selector()->selection()->getSelected(ModuleBase_ISelection::AllControls);
336 if (aSelected.size() == 0)
339 bool isModified = false;
340 static Events_ID aDispEvent = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
342 std::map<ObjectPtr, TopoDS_ListOfShape> anObjectToShapes;
343 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) > anObjectToPrs;
344 std::set<int> aToRemove;
346 for (int i = 0; i < aSelected.size(); i++) {
347 ModuleBase_ViewerPrsPtr aPrs = aSelected[i];
348 ObjectPtr anObject = aPrs->object();
352 ResultGroupPtr aResGroup;
353 FeaturePtr aGroupFeature;
354 if (getGroup(aPrs, aResGroup, aGroupFeature)) {
355 AttributeSelectionListPtr aSelectionListAttr =
356 aGroupFeature->data()->selectionList("group_list");
357 std::string aType = aSelectionListAttr->selectionType();
358 if (aType != "Faces")
362 GeomShapePtr aShapePtr = aPrs->shape();
363 if (!aShapePtr.get() || !aShapePtr->isFace())
367 QString aItemName = aResGroup.get()?
368 aResGroup->data()->name().c_str() : XGUI_Tools::generateName(aPrs);
369 if (myListView->hasItem(aItemName))
372 if (aResGroup.get()) {
373 if (aResGroup->isDisplayed()) {
374 aResGroup->setDisplayed(false);
375 myHiddenGroups.insert(aResGroup);
377 getObjectsMapFromResult(aResGroup, aGroupFeature, anObjectToShapes, anObjectToPrs);
380 objectsMapFromPrs(aPrs, anObjectToShapes, anObjectToPrs);
382 // The code is dedicated to remove already selected items if they are selected twice
383 // It can happen in case of groups selection
384 QMap<int, ModuleBase_ViewerPrsPtr>::const_iterator aIt;
385 for (aIt = myItems.cbegin(); aIt != myItems.cend(); aIt++) {
386 ModuleBase_ViewerPrsPtr aPrs = aIt.value();
387 ObjectPtr aObject = aPrs->object();
388 ResultGroupPtr aResGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(aObject);
391 if (anObjectToShapes.find(aObject) != anObjectToShapes.end()) {
392 TopoDS_ListOfShape aShapes = anObjectToShapes[aObject];
393 GeomShapePtr aShapePtr = aPrs->shape();
394 if (aShapes.Contains(aShapePtr->impl<TopoDS_Shape>())) {
395 aToRemove.insert(aIt.key());
400 myItems.insert(myLastItemIndex, aPrs);
401 myListView->addItem(aItemName, myLastItemIndex);
406 // Hide fully hidden shapes
407 std::map<ObjectPtr, TopoDS_ListOfShape>::const_iterator anIt;
408 for (anIt = anObjectToShapes.begin(); anIt != anObjectToShapes.end(); anIt++) {
409 ObjectPtr anObject = anIt->first;
410 if (!anObject.get() || anObjectToPrs.find(anObject) == anObjectToPrs.end())
412 Handle(ModuleBase_ResultPrs) aResultPrs = anObjectToPrs.at(anObject);
414 if (!aResultPrs->hasSubShapeVisible(anIt->second)) { // redisplay
415 // erase object because it is entirely hidden
416 anObject->setDisplayed(false);
417 myHiddenObjects.insert(anObject);
419 ModelAPI_EventCreator::get()->sendUpdated(anObject, aDispEvent);
422 // Process selected presentations
423 double aTransp = transparency();
424 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs)>::iterator aPrsIt;
425 for (aPrsIt = anObjectToPrs.begin(); aPrsIt != anObjectToPrs.end(); aPrsIt++) {
426 ObjectPtr anObject = aPrsIt->first;
427 Handle(ModuleBase_ResultPrs) aPrs = aPrsIt->second;
428 TopoDS_ListOfShape aAlreadyHidden = aPrs->hiddenSubShapes();
429 TopoDS_ListOfShape aListOfShapes = anObjectToShapes[anObject];
430 TopoDS_ListOfShape::Iterator aShapesIt(aListOfShapes);
431 for (; aShapesIt.More(); aShapesIt.Next()) {
432 if (!aAlreadyHidden.Contains(aShapesIt.Value()))
433 aAlreadyHidden.Append(aShapesIt.Value());
435 aPrs->setSubShapeHidden(aAlreadyHidden);
436 aPrs->setHiddenSubShapeTransparency(aTransp);
439 // Remove duplicate items
440 if (aToRemove.size() > 0) {
441 myListView->removeItems(aToRemove);
442 std::set<int>::const_iterator aIntIt;
443 for (aIntIt = aToRemove.cbegin(); aIntIt != aToRemove.cend(); aIntIt++)
444 myItems.remove(*aIntIt);
447 updateProcessedObjects(myItems, myItemObjects);
452 //********************************************************************
453 bool XGUI_FacesPanel::processDelete()
455 //appendFirstSelectionInHistory();
456 QModelIndexList anIndices = myListView->getControl()->selectionModel()->selectedIndexes();
458 std::set<int> aSelectedIds;
459 myListView->getSelectedIndices(aSelectedIds);
460 if (aSelectedIds.empty())
463 bool isModified = false;
464 std::set<ModuleBase_ViewerPrsPtr> aRestored;
465 std::set<int>::const_iterator anIt;
466 for (anIt = aSelectedIds.begin(); anIt != aSelectedIds.end(); anIt++) {
467 ModuleBase_ViewerPrsPtr aPrs = myItems[*anIt];
468 if (aRestored.find(aPrs) == aRestored.end()) {
469 aRestored.insert(aPrs);
470 myItems.remove(*anIt);
474 std::map<ObjectPtr, TopoDS_ListOfShape> anObjectToShapes;
475 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) > anObjectToPrs;
477 std::set<ModuleBase_ViewerPrsPtr>::const_iterator aIt;
478 for (aIt = aRestored.cbegin(); aIt != aRestored.cend(); aIt++) {
479 getObjectsMapFromPrs((*aIt), anObjectToShapes, anObjectToPrs);
480 ResultGroupPtr aResGroup;
481 FeaturePtr aGroupFeature;
482 if (getGroup((*aIt), aResGroup, aGroupFeature)) {
483 std::set<std::shared_ptr<ModelAPI_Object> >::iterator aGrpIt = myHiddenGroups.find(aResGroup);
484 if (aGrpIt != myHiddenGroups.end()) {
485 aResGroup->setDisplayed(true);
486 myHiddenGroups.erase(aGrpIt);
491 std::set<ObjectPtr> aRestoredObjects;
492 std::map<ObjectPtr, TopoDS_ListOfShape>::const_iterator aShapesIt;
493 for (aShapesIt = anObjectToShapes.begin(); aShapesIt != anObjectToShapes.end(); aShapesIt++) {
494 TopoDS_ListOfShape aShapes = aShapesIt->second;
495 aRestoredObjects.insert(aShapesIt->first);
496 Handle(ModuleBase_ResultPrs) aPrs = anObjectToPrs[aShapesIt->first];
497 TopoDS_ListOfShape aHiddenShapes = aPrs->hiddenSubShapes();
498 TopoDS_ListOfShape::Iterator aSubShapesIt(aShapes);
499 for (; aSubShapesIt.More(); aSubShapesIt.Next()) {
500 if (aHiddenShapes.Contains(aSubShapesIt.Value()))
501 aHiddenShapes.Remove(aSubShapesIt.Value());
503 aPrs->setSubShapeHidden(aHiddenShapes);
505 if (redisplayObjects(aRestoredObjects))
508 myListView->removeSelectedItems();
512 //********************************************************************
513 bool XGUI_FacesPanel::redisplayObjects(
514 const std::set<std::shared_ptr<ModelAPI_Object> >& theObjects)
516 if (theObjects.empty())
519 bool isModified = false;
520 static Events_ID aDispEvent = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
521 for (std::set<ObjectPtr>::const_iterator anIt = theObjects.begin(); anIt != theObjects.end();
524 ObjectPtr anObject = *anIt;
525 if (!anObject->isDisplayed())
527 ModelAPI_EventCreator::get()->sendUpdated(anObject, aDispEvent);
533 //********************************************************************
534 void XGUI_FacesPanel::updateProcessedObjects(QMap<int, ModuleBase_ViewerPrsPtr> theItems,
535 std::set<ObjectPtr>& theObjects)
538 for (QMap<int, ModuleBase_ViewerPrsPtr>::const_iterator anIt = theItems.begin();
539 anIt != theItems.end(); anIt++) {
540 ModuleBase_ViewerPrsPtr aPrs = anIt.value();
541 ObjectPtr anObject = aPrs.get() ? aPrs->object() : ObjectPtr();
542 if (anObject.get()) {
543 ResultGroupPtr aResGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(anObject);
544 if (aResGroup.get()) {
545 FeaturePtr aGroupFeature = ModelAPI_Feature::feature(aResGroup);
546 AttributeSelectionListPtr aSelectionList = aGroupFeature->selectionList("group_list");
547 for (int i = 0; i < aSelectionList->size(); i++) {
548 AttributeSelectionPtr aSelection = aSelectionList->value(i);
549 ResultPtr aRes = aSelection->context();
550 if (theObjects.find(aRes) == theObjects.end())
551 theObjects.insert(aRes);
555 if (theObjects.find(anObject) == theObjects.end())
556 theObjects.insert(anObject);
562 //********************************************************************
563 void XGUI_FacesPanel::closeEvent(QCloseEvent* theEvent)
565 QDockWidget::closeEvent(theEvent);
569 //********************************************************************
570 void XGUI_FacesPanel::onDeleteItem()
575 //********************************************************************
576 void XGUI_FacesPanel::onTransparencyChanged()
578 std::map<ObjectPtr, TopoDS_ListOfShape> anObjectToShapes;
579 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) > anObjectToPrs;
580 QMap<int, std::shared_ptr<ModuleBase_ViewerPrs> >::const_iterator aIt;
581 for (aIt = myItems.cbegin(); aIt != myItems.cend(); aIt++) {
582 getObjectsMapFromPrs(aIt.value(), anObjectToShapes, anObjectToPrs);
585 double aTransp = Config_PropManager::real("Visualization", "hidden_face_transparency");
586 std::set<ObjectPtr> aObjects;
587 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs)>::const_iterator aPrsIt;
588 for (aPrsIt = anObjectToPrs.cbegin(); aPrsIt != anObjectToPrs.cend(); aPrsIt++) {
589 aObjects.insert(aPrsIt->first);
590 aPrsIt->second->setHiddenSubShapeTransparency(useTransparency()? aTransp : 1);
592 if (redisplayObjects(aObjects))
596 //********************************************************************
597 void XGUI_FacesPanel::onClosed()
599 setActivePanel(false);
603 //********************************************************************
604 void XGUI_FacesPanel::flushRedisplay() const
606 Events_Loop::loop()->flush(Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY));
607 // Necessary for update visibility icons in ObjectBrowser
608 XGUI_ObjectsBrowser* anObjectBrowser = myWorkshop->objectBrowser();
610 anObjectBrowser->updateAllIndexes();
611 myWorkshop->viewer()->update();