From 2cb130f1bba2bb8dba6f2c053963d126860805f4 Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 9 Apr 2020 12:40:35 +0300 Subject: [PATCH] Issue #3202: Fix behavior of Delete operation --- src/PartSet/PartSet_WidgetSketchLabel.cpp | 3 +++ src/XGUI/XGUI_OperationMgr.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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()) { -- 2.39.2