From: apo Date: Mon, 26 Nov 2007 10:52:27 +0000 (+0000) Subject: Fix for Bug IPAL17867 X-Git-Tag: mergeto_BR_Dev_For_4_0_07-Dec-07~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4bc0463f4aac4539b841103c16cb6f6868b5987d;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 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); }