]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Prevent crash on deletion of several features by a one command
authorvsv <vitaly.smetannikov@opencascade.com>
Wed, 15 Jul 2015 16:27:02 +0000 (19:27 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Wed, 15 Jul 2015 16:27:02 +0000 (19:27 +0300)
src/ModuleBase/ModuleBase_WidgetFactory.cpp
src/XGUI/XGUI_Workshop.cpp

index 2787b00acf3b0d97fd9921592528380e9a906b5d..2e2290491abe5e78514fd9e0514a5c0fac4fd304 100644 (file)
@@ -152,7 +152,7 @@ ModuleBase_ModelWidget* ModuleBase_WidgetFactory::createWidgetByType(const std::
     result = myWorkshop->module()->createWidgetByType(theType, theParent, myWidgetApi, myParentId);
     #ifdef _DEBUG
     if (!result) {
-      qDebug("ModuleBase_WidgetFactory::fillWidget: find bad widget type");
+      qDebug("ModuleBase_WidgetFactory::fillWidget: find bad widget type %s", theType.c_str());
     }
     #endif
   }
index 8aa17ceb66c8337496bd9c9ebd2b3d4f5d7706e5..0fdec6b580b46c1f65e7dfa28ca97c6e4480134e 100644 (file)
@@ -1019,6 +1019,9 @@ void XGUI_Workshop::deleteObjects()
   if (!isActiveOperationAborted())
     return;
   QObjectPtrList anObjects = mySelector->selection()->selectedObjects();
+  // It is necessary to clear selection in order to avoid selection changed event during
+  // deleteion and negative consequences connected with processing of already deleted items
+  mySelector->clearSelection();
   // check whether the object can be deleted. There should not be parts which are not loaded
   if (!XGUI_Tools::canRemoveOrRename(myMainWindow, anObjects))
     return;