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, FeaturePtr theGroupFeature,
262 std::map<ObjectPtr, TopoDS_ListOfShape>& theObjectToShapes,
263 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) >& theObjectToPrs)
265 XGUI_Displayer* aDisplayer = myWorkshop->displayer();
266 // Process a grouip result
267 AttributeSelectionListPtr aSelectionList = theGroupFeature->selectionList("group_list");
269 for (int i = 0; i < aSelectionList->size(); i++) {
270 AttributeSelectionPtr aSelection = aSelectionList->value(i);
271 ResultPtr aRes = aSelection->context();
272 aPrs = aDisplayer->getAISObject(aRes);
274 Handle(ModuleBase_ResultPrs) aResultPrs = Handle(ModuleBase_ResultPrs)::DownCast(
275 aPrs->impl<Handle(AIS_InteractiveObject)>());
276 if (!aResultPrs.IsNull()) {
277 GeomShapePtr aShape = aSelection->value();
278 if (theObjectToShapes.find(aRes) != theObjectToShapes.end())
279 theObjectToShapes.at(aRes).Append(aShape->impl<TopoDS_Shape>());
281 TopoDS_ListOfShape aListOfShapes;
282 aListOfShapes.Append(aShape->impl<TopoDS_Shape>());
283 theObjectToShapes[aRes] = aListOfShapes;
284 theObjectToPrs[aRes] = aResultPrs;
291 //********************************************************************
292 void objectsMapFromPrs(ModuleBase_ViewerPrsPtr thePrs,
293 std::map<ObjectPtr, TopoDS_ListOfShape>& theObjectToShapes,
294 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) >& theObjectToPrs)
296 ObjectPtr anObject = thePrs->object();
301 Handle(ModuleBase_ResultPrs) aResultPrs = Handle(ModuleBase_ResultPrs)::DownCast(
302 thePrs->interactive());
303 if (aResultPrs.IsNull())
306 if (theObjectToShapes.find(anObject) != theObjectToShapes.end())
307 theObjectToShapes.at(anObject).Append(ModuleBase_Tools::getSelectedShape(thePrs));
309 TopoDS_ListOfShape aListOfShapes;
310 aListOfShapes.Append(ModuleBase_Tools::getSelectedShape(thePrs));
311 theObjectToShapes[anObject] = aListOfShapes;
312 theObjectToPrs[anObject] = aResultPrs;
316 //********************************************************************
317 void XGUI_FacesPanel::getObjectsMapFromPrs(ModuleBase_ViewerPrsPtr thePrs,
318 std::map<ObjectPtr, TopoDS_ListOfShape>& theObjectToShapes,
319 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) >& theObjectToPrs)
321 ResultGroupPtr aResGroup;
322 FeaturePtr aGroupFeature;
323 if (getGroup(thePrs, aResGroup, aGroupFeature))
324 getObjectsMapFromResult(aResGroup, aGroupFeature, theObjectToShapes, theObjectToPrs);
326 objectsMapFromPrs(thePrs, theObjectToShapes, theObjectToPrs);
329 //********************************************************************
330 void XGUI_FacesPanel::processSelection()
332 QList<ModuleBase_ViewerPrsPtr> aSelected =
333 myWorkshop->selector()->selection()->getSelected(ModuleBase_ISelection::AllControls);
335 if (aSelected.size() == 0)
338 bool isModified = false;
339 static Events_ID aDispEvent = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
341 std::map<ObjectPtr, TopoDS_ListOfShape> anObjectToShapes;
342 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) > anObjectToPrs;
343 std::set<int> aToRemove;
345 for (int i = 0; i < aSelected.size(); i++) {
346 ModuleBase_ViewerPrsPtr aPrs = aSelected[i];
347 ObjectPtr anObject = aPrs->object();
351 ResultGroupPtr aResGroup;
352 FeaturePtr aGroupFeature;
353 if (getGroup(aPrs, aResGroup, aGroupFeature)) {
354 AttributeSelectionListPtr aSelectionListAttr =
355 aGroupFeature->data()->selectionList("group_list");
356 std::string aType = aSelectionListAttr->selectionType();
357 if (aType != "Faces")
361 GeomShapePtr aShapePtr = aPrs->shape();
362 if (!aShapePtr.get() || !aShapePtr->isFace())
366 QString aItemName = aResGroup.get()?
367 aResGroup->data()->name().c_str() : XGUI_Tools::generateName(aPrs);
368 if (myListView->hasItem(aItemName))
371 if (aResGroup.get()) {
372 if (aResGroup->isDisplayed()) {
373 aResGroup->setDisplayed(false);
374 myHiddenGroups.insert(aResGroup);
376 getObjectsMapFromResult(aResGroup, aGroupFeature, anObjectToShapes, anObjectToPrs);
379 objectsMapFromPrs(aPrs, anObjectToShapes, anObjectToPrs);
381 // The code is dedicated to remove already selected items if they are selected twice
382 // It can happen in case of groups selection
383 QMap<int, ModuleBase_ViewerPrsPtr>::const_iterator aIt;
384 for (aIt = myItems.cbegin(); aIt != myItems.cend(); aIt++) {
385 ModuleBase_ViewerPrsPtr aPrs = aIt.value();
386 ObjectPtr aObject = aPrs->object();
387 ResultGroupPtr aResGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(aObject);
390 if (anObjectToShapes.find(aObject) != anObjectToShapes.end()) {
391 TopoDS_ListOfShape aShapes = anObjectToShapes[aObject];
392 GeomShapePtr aShapePtr = aPrs->shape();
393 if (aShapes.Contains(aShapePtr->impl<TopoDS_Shape>())) {
394 aToRemove.insert(aIt.key());
399 myItems.insert(myLastItemIndex, aPrs);
400 myListView->addItem(aItemName, myLastItemIndex);
405 // Hide fully hidden shapes
406 std::map<ObjectPtr, TopoDS_ListOfShape>::const_iterator anIt;
407 for (anIt = anObjectToShapes.begin(); anIt != anObjectToShapes.end(); anIt++) {
408 ObjectPtr anObject = anIt->first;
409 if (!anObject.get() || anObjectToPrs.find(anObject) == anObjectToPrs.end())
411 Handle(ModuleBase_ResultPrs) aResultPrs = anObjectToPrs.at(anObject);
413 if (!aResultPrs->hasSubShapeVisible(anIt->second)) { // redisplay
414 // erase object because it is entirely hidden
415 anObject->setDisplayed(false);
416 myHiddenObjects.insert(anObject);
418 ModelAPI_EventCreator::get()->sendUpdated(anObject, aDispEvent);
421 // Process selected presentations
422 double aTransp = transparency();
423 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs)>::iterator aPrsIt;
424 for (aPrsIt = anObjectToPrs.begin(); aPrsIt != anObjectToPrs.end(); aPrsIt++) {
425 ObjectPtr anObject = aPrsIt->first;
426 Handle(ModuleBase_ResultPrs) aPrs = aPrsIt->second;
427 TopoDS_ListOfShape aAlreadyHidden = aPrs->hiddenSubShapes();
428 TopoDS_ListOfShape aListOfShapes = anObjectToShapes[anObject];
429 TopoDS_ListOfShape::Iterator aShapesIt(aListOfShapes);
430 for (; aShapesIt.More(); aShapesIt.Next()) {
431 if (!aAlreadyHidden.Contains(aShapesIt.Value()))
432 aAlreadyHidden.Append(aShapesIt.Value());
434 aPrs->setSubShapeHidden(aAlreadyHidden);
435 aPrs->setHiddenSubShapeTransparency(aTransp);
438 // Remove duplicate items
439 if (aToRemove.size() > 0) {
440 myListView->removeItems(aToRemove);
441 std::set<int>::const_iterator aIntIt;
442 for (aIntIt = aToRemove.cbegin(); aIntIt != aToRemove.cend(); aIntIt++)
443 myItems.remove(*aIntIt);
446 updateProcessedObjects(myItems, myItemObjects);
451 //********************************************************************
452 bool XGUI_FacesPanel::processDelete()
454 //appendFirstSelectionInHistory();
455 QModelIndexList anIndices = myListView->getControl()->selectionModel()->selectedIndexes();
457 std::set<int> aSelectedIds;
458 myListView->getSelectedIndices(aSelectedIds);
459 if (aSelectedIds.empty())
462 bool isModified = false;
463 std::set<ModuleBase_ViewerPrsPtr> aRestored;
464 std::set<int>::const_iterator anIt;
465 for (anIt = aSelectedIds.begin(); anIt != aSelectedIds.end(); anIt++) {
466 ModuleBase_ViewerPrsPtr aPrs = myItems[*anIt];
467 if (aRestored.find(aPrs) == aRestored.end()) {
468 aRestored.insert(aPrs);
469 myItems.remove(*anIt);
473 std::map<ObjectPtr, TopoDS_ListOfShape> anObjectToShapes;
474 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) > anObjectToPrs;
476 std::set<ModuleBase_ViewerPrsPtr>::const_iterator aIt;
477 for (aIt = aRestored.cbegin(); aIt != aRestored.cend(); aIt++) {
478 getObjectsMapFromPrs((*aIt), anObjectToShapes, anObjectToPrs);
479 ResultGroupPtr aResGroup;
480 FeaturePtr aGroupFeature;
481 if (getGroup((*aIt), aResGroup, aGroupFeature)) {
482 std::set<std::shared_ptr<ModelAPI_Object> >::iterator aGrpIt = myHiddenGroups.find(aResGroup);
483 if (aGrpIt != myHiddenGroups.end()) {
484 aResGroup->setDisplayed(true);
485 myHiddenGroups.erase(aGrpIt);
490 std::set<ObjectPtr> aRestoredObjects;
491 std::map<ObjectPtr, TopoDS_ListOfShape>::const_iterator aShapesIt;
492 for (aShapesIt = anObjectToShapes.begin(); aShapesIt != anObjectToShapes.end(); aShapesIt++) {
493 TopoDS_ListOfShape aShapes = aShapesIt->second;
494 aRestoredObjects.insert(aShapesIt->first);
495 Handle(ModuleBase_ResultPrs) aPrs = anObjectToPrs[aShapesIt->first];
496 TopoDS_ListOfShape aHiddenShapes = aPrs->hiddenSubShapes();
497 TopoDS_ListOfShape::Iterator aSubShapesIt(aShapes);
498 for (; aSubShapesIt.More(); aSubShapesIt.Next()) {
499 if (aHiddenShapes.Contains(aSubShapesIt.Value()))
500 aHiddenShapes.Remove(aSubShapesIt.Value());
502 aPrs->setSubShapeHidden(aHiddenShapes);
504 if (redisplayObjects(aRestoredObjects))
507 myListView->removeSelectedItems();
511 //********************************************************************
512 bool XGUI_FacesPanel::redisplayObjects(
513 const std::set<std::shared_ptr<ModelAPI_Object> >& theObjects)
515 if (theObjects.empty())
518 bool isModified = false;
519 static Events_ID aDispEvent = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
520 for (std::set<ObjectPtr>::const_iterator anIt = theObjects.begin(); anIt != theObjects.end();
523 ObjectPtr anObject = *anIt;
524 if (!anObject->isDisplayed())
526 ModelAPI_EventCreator::get()->sendUpdated(anObject, aDispEvent);
532 //********************************************************************
533 void XGUI_FacesPanel::updateProcessedObjects(QMap<int, ModuleBase_ViewerPrsPtr> theItems,
534 std::set<ObjectPtr>& theObjects)
537 for (QMap<int, ModuleBase_ViewerPrsPtr>::const_iterator anIt = theItems.begin();
538 anIt != theItems.end(); anIt++) {
539 ModuleBase_ViewerPrsPtr aPrs = anIt.value();
540 ObjectPtr anObject = aPrs.get() ? aPrs->object() : ObjectPtr();
541 if (anObject.get()) {
542 ResultGroupPtr aResGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(anObject);
543 if (aResGroup.get()) {
544 FeaturePtr aGroupFeature = ModelAPI_Feature::feature(aResGroup);
545 AttributeSelectionListPtr aSelectionList = aGroupFeature->selectionList("group_list");
546 for (int i = 0; i < aSelectionList->size(); i++) {
547 AttributeSelectionPtr aSelection = aSelectionList->value(i);
548 ResultPtr aRes = aSelection->context();
549 if (theObjects.find(aRes) == theObjects.end())
550 theObjects.insert(aRes);
554 if (theObjects.find(anObject) == theObjects.end())
555 theObjects.insert(anObject);
561 //********************************************************************
562 void XGUI_FacesPanel::closeEvent(QCloseEvent* theEvent)
564 QDockWidget::closeEvent(theEvent);
568 //********************************************************************
569 void XGUI_FacesPanel::onDeleteItem()
574 //********************************************************************
575 void XGUI_FacesPanel::onTransparencyChanged()
577 std::map<ObjectPtr, TopoDS_ListOfShape> anObjectToShapes;
578 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs) > anObjectToPrs;
579 QMap<int, std::shared_ptr<ModuleBase_ViewerPrs> >::const_iterator aIt;
580 for (aIt = myItems.cbegin(); aIt != myItems.cend(); aIt++) {
581 getObjectsMapFromPrs(aIt.value(), anObjectToShapes, anObjectToPrs);
584 double aTransp = Config_PropManager::real("Visualization", "hidden_face_transparency");
585 std::set<ObjectPtr> aObjects;
586 std::map<ObjectPtr, Handle(ModuleBase_ResultPrs)>::const_iterator aPrsIt;
587 for (aPrsIt = anObjectToPrs.cbegin(); aPrsIt != anObjectToPrs.cend(); aPrsIt++) {
588 aObjects.insert(aPrsIt->first);
589 aPrsIt->second->setHiddenSubShapeTransparency(useTransparency()? aTransp : 1);
591 if (redisplayObjects(aObjects))
595 //********************************************************************
596 void XGUI_FacesPanel::onClosed()
598 setActivePanel(false);
602 //********************************************************************
603 void XGUI_FacesPanel::flushRedisplay() const
605 Events_Loop::loop()->flush(Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY));
606 // Necessary for update visibility icons in ObjectBrowser
607 XGUI_ObjectsBrowser* anObjectBrowser = myWorkshop->objectBrowser();
609 anObjectBrowser->updateAllIndexes();
610 myWorkshop->viewer()->update();