]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #3202: Fix behavior of Delete operation
authorvsv <vsv@opencascade.com>
Thu, 9 Apr 2020 09:40:35 +0000 (12:40 +0300)
committervsv <vsv@opencascade.com>
Thu, 9 Apr 2020 09:40:35 +0000 (12:40 +0300)
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/XGUI/XGUI_OperationMgr.cpp

index cd11fabee5f4b58c7a01f1fec4e5eee027f01ebf..242773ea366dc27977e591f58d7e1a1237903abc 100644 (file)
@@ -867,6 +867,9 @@ void PartSet_WidgetSketchLabel::onShowDOF()
     static const Events_ID anEvent = Events_Loop::eventByName(EVENT_GET_DOF_OBJECTS);
     ModelAPI_EventCreator::get()->sendUpdated(aCompFeature, anEvent);
     Events_Loop::loop()->flush(anEvent);
+    QWidget* aViewPort = myWorkshop->viewer()->activeViewPort();
+    if (aViewPort)
+      aViewPort->setFocus();
   }
 }
 
index a8813844bfd595d12ce5709f4d49dc082d7258df..bff45c11e19d1e7d2f122693b2ccf337dd2da40a 100644 (file)
@@ -867,7 +867,7 @@ bool XGUI_OperationMgr::onProcessDelete(QObject* theObject)
     /// processing delete by workshop
     XGUI_ObjectsBrowser* aBrowser = XGUI_Tools::workshop(myWorkshop)->objectBrowser();
     QWidget* aViewPort = myWorkshop->viewer()->activeViewPort();
-    bool isToDeleteObject = true;
+    bool isToDeleteObject = false;
     XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(myWorkshop);
     XGUI_ContextMenuMgr* aContextMenuMgr = aWorkshop->contextMenuMgr();
     if (theObject == aBrowser->treeView()) {