From: vsv Date: Thu, 9 Apr 2020 09:40:35 +0000 (+0300) Subject: Issue #3202: Fix behavior of Delete operation X-Git-Tag: V9_5_0b1~57 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2cb130f1bba2bb8dba6f2c053963d126860805f4;p=modules%2Fshaper.git Issue #3202: Fix behavior of Delete operation --- diff --git a/src/PartSet/PartSet_WidgetSketchLabel.cpp b/src/PartSet/PartSet_WidgetSketchLabel.cpp index cd11fabee..242773ea3 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.cpp +++ b/src/PartSet/PartSet_WidgetSketchLabel.cpp @@ -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(); } } diff --git a/src/XGUI/XGUI_OperationMgr.cpp b/src/XGUI/XGUI_OperationMgr.cpp index a8813844b..bff45c11e 100644 --- a/src/XGUI/XGUI_OperationMgr.cpp +++ b/src/XGUI/XGUI_OperationMgr.cpp @@ -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()) {