From 4bc0463f4aac4539b841103c16cb6f6868b5987d Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 26 Nov 2007 10:52:27 +0000 Subject: [PATCH] Fix for Bug IPAL17867 navigation buttons for 3D cashe disabled --- src/VISUGUI/VisuGUI_Selection.cxx | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/src/VISUGUI/VisuGUI_Selection.cxx b/src/VISUGUI/VisuGUI_Selection.cxx index e5608936..1b34f13a 100644 --- a/src/VISUGUI/VisuGUI_Selection.cxx +++ b/src/VISUGUI/VisuGUI_Selection.cxx @@ -89,8 +89,6 @@ using namespace std; -static VisuGUI_SelectionDlg* mySelectionDlg = NULL; - VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule): QDialog(VISU::GetDesktop(theModule), 0, @@ -99,9 +97,6 @@ VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule): mySelectionMgr(NULL), myModule(theModule) { - if (mySelectionDlg) - mySelectionDlg->close(true); - setCaption( "Data on elements" ); setSizeGripEnabled(TRUE); @@ -289,12 +284,20 @@ VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule): if (SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow(myModule)) aViewWindow->SetSelectionMode(NodeSelection); onSelectionEvent(); - - mySelectionDlg = this; } VisuGUI_SelectionDlg::~VisuGUI_SelectionDlg() { + SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow(myModule); + if ( !aViewWindow ) + return; + + switch ( aViewWindow->SelectionMode() ) { + case NodeSelection: + case CellSelection: + aViewWindow->SetSelectionMode(ActorSelection); + break; + } } void VisuGUI_SelectionDlg::onSelectionChange (int theId) @@ -323,18 +326,6 @@ void VisuGUI_SelectionDlg::onSelectionChange (int theId) void VisuGUI_SelectionDlg::closeEvent (QCloseEvent* theEvent) { - if (mySelectionDlg) { - mySelectionDlg = NULL; - disconnect(mySelectionMgr,0,0,0); - if (SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow(myModule)) { - switch(aViewWindow->SelectionMode()){ - case NodeSelection: - case CellSelection: - aViewWindow->SetSelectionMode(ActorSelection); - break; - } - } - } QDialog::closeEvent(theEvent); } -- 2.39.2