#include "VISU_PipeLine.hxx"
#include "VisuGUI.h"
#include "QAD_MessageBox.h"
+#include "QAD_RightFrame.h"
#include "VTKViewer_ViewFrame.h"
#include <TColStd_MapOfInteger.hxx>
using namespace std;
extern VisuGUI *visuGUI;
-
+static QAD_Study* myStudy = NULL;
+static VisuGUI_SelectionDlg* mySelectionDlg = NULL;
VisuGUI_SelectionDlg::VisuGUI_SelectionDlg()
: QDialog( QAD_Application::getDesktop(), 0, false,
- WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
+ WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose)
{
+ if(mySelectionDlg)
+ mySelectionDlg->close(true);
+
setCaption( "Data on elements" );
setSizeGripEnabled( TRUE );
TopLayout->addWidget(aBtnBox, 3, 0);
- mySelection = SALOME_Selection::Selection(visuGUI->GetActiveStudy()->getSelection());
+ myStudy = visuGUI->GetActiveStudy();
+ mySelection = SALOME_Selection::Selection(myStudy->getSelection());
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionEvent()));
+ connect(visuGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(close()));
+
myFl = false;
onSelectionChange(0);
+
+ mySelectionDlg = this;
}
}
-void VisuGUI_SelectionDlg::closeEvent(QCloseEvent* theEvent) {
+void VisuGUI_SelectionDlg::closeEvent(QCloseEvent* theEvent) {
+ mySelectionDlg = NULL;
+ myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame()->SetSelectionMode( ActorSelection );
QAD_Application::getDesktop()->SetSelectionMode(ActorSelection, true);
disconnect(mySelection,0,0,0);
QDialog::closeEvent(theEvent);
TColStd_MapIteratorOfMapOfInteger anIter(aMapIndex);
VISU_Actor* anActor = visuGUI->GetActor(aPrs3d);
+ if(!anActor)
+ return;
vtkDataSet* aDataSet = anActor->GetMapper()->GetInput();
vtkPointData* aPntData = aDataSet->GetPointData();