From: apo Date: Fri, 30 Nov 2007 12:11:14 +0000 (+0000) Subject: Fix for Bug IPAL17867 X-Git-Tag: mergefrom_MERGE_MULTIPR_EVOLUTION_07-Dec-07~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4fad0fe5a2a267b01a3610453221ce79e53c77f3;p=modules%2Fvisu.git Fix for Bug IPAL17867 navigation buttons for 3D cashe disabled --- diff --git a/src/VISUGUI/VisuGUI_Selection.cxx b/src/VISUGUI/VisuGUI_Selection.cxx index a7326897..3dcac912 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); }