From 93a152798f82b2709cc70e6584875eb3ae13c302 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 18 Oct 2010 09:05:02 +0000 Subject: [PATCH] Fix for the Bug IPAL22041 TC5.1.5: "Fillet Construcion" dialog loses current selection. --- src/OperationGUI/OperationGUI_ChamferDlg.cxx | 13 +++++++++++++ src/OperationGUI/OperationGUI_FilletDlg.cxx | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/OperationGUI/OperationGUI_ChamferDlg.cxx b/src/OperationGUI/OperationGUI_ChamferDlg.cxx index a10babc44..71a6e290c 100644 --- a/src/OperationGUI/OperationGUI_ChamferDlg.cxx +++ b/src/OperationGUI/OperationGUI_ChamferDlg.cxx @@ -526,6 +526,19 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument() default: break; } + + //rnv: To fix the bug IPAL22041 TC5.1.5: "Fillet Construcion" dialog loses current selection. + // Restore selection of the main shape, if need, + // because it was canceled. + aSelMgr->selectedObjects(aSelList); + if (aSelList.Extent() == 0 && !myShape->_is_nil()) { + disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); + ObjectList list; + list.push_back(myShape); + selectObjects(list); + connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), + this, SLOT(SelectionIntoArgument())); + } } //================================================================================= diff --git a/src/OperationGUI/OperationGUI_FilletDlg.cxx b/src/OperationGUI/OperationGUI_FilletDlg.cxx index 85ac40d6e..e18e1cb4c 100644 --- a/src/OperationGUI/OperationGUI_FilletDlg.cxx +++ b/src/OperationGUI/OperationGUI_FilletDlg.cxx @@ -422,6 +422,19 @@ void OperationGUI_FilletDlg::SelectionIntoArgument() default: break; } + + //rnv: To fix the bug IPAL22041 TC5.1.5: "Fillet Construcion" dialog loses current selection. + // Restore selection of the main shape, if need, + // because it was canceled. + aSelMgr->selectedObjects(aSelList); + if (aSelList.Extent() == 0 && !myShape->_is_nil()) { + disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); + ObjectList list; + list.push_back(myShape); + selectObjects(list); + connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), + this, SLOT(SelectionIntoArgument())); + } } //=================================================================================