+//**************************************************************
+void XGUI_Workshop::toggleBringToFront(const QObjectPtrList& theList)
+{
+ // Toggle the "BringToFront" state of all objects in the list
+ foreach(ObjectPtr anObj, theList) {
+ ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(anObj);
+ if (aResult.get() != NULL)
+ {
+ bool aBringToFront = !ModelAPI_Tools::isBringToFront(aResult);
+ ModelAPI_Tools::bringToFront(aResult, aBringToFront);
+ myDisplayer->redisplay(anObj, false);
+ }
+ }
+ if (theList.size() > 0)
+ myDisplayer->updateViewer();
+}
+