//extern VisuGUI *visuGUI;
-VisuGUI_CutPlanesPane::VisuGUI_CutPlanesPane (QWidget* theParent/*, SUIT_ViewManager* theMgr*/)
- : QFrame(theParent), myPreviewActor(0)//, myMgr(theMgr)
+VisuGUI_CutPlanesPane::VisuGUI_CutPlanesPane (QWidget* theParent)
+ : QFrame(theParent), myPreviewActor(0)
{
QGridLayout* TopLayout = new QGridLayout( this );
TopLayout->setSpacing( 6 );
if (myPreviewActor != 0) return;
vtkAppendPolyData* aPolyData = myCutPlanes->GetCutPlanesPL()->GetAppendPolyData();
- vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
if (!aPolyData->GetOutput()->GetNumberOfCells()) {
onPreviewCheck(false);
return;
}
+ vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
aPlaneMapper->SetInput(aPolyData->GetOutput());
aPlaneMapper->ScalarVisibilityOff();
/*!
Constructor
*/
-VisuGUI_CutPlanesDlg::VisuGUI_CutPlanesDlg (QWidget* parent, bool theIsCreation, bool theIsModal)
- : QDialog(parent, "VisuGUI_CutPlanesDlg", theIsModal, WStyle_Customize |
- WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
- //,myMgr(VisuGUI::application()->activeViewManager())
+VisuGUI_CutPlanesDlg::VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule)
+ : QDialog(VISU::GetDesktop(theModule), "VisuGUI_CutPlanesDlg", false,
+ WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{
- //myStudyWnd = myMgr->getActiveView();
- if (!theIsModal) {
- setWFlags(getWFlags() | WDestructiveClose);
- }
setCaption("Cut Planes Definition");
setSizeGripEnabled(true);
- myIsCreation = theIsCreation;
QVBoxLayout* TopLayout = new QVBoxLayout (this);
TopLayout->setSpacing(6);
void VisuGUI_CutPlanesDlg::accept()
{
+ //if ( !VisuGUI::CheckActiveStudyLock() ) {
+ // reject();
+ // return;
+ //}
if (myScalarPane->check())
- QDialog::accept();
+ {
+ myScalarPane->deletePreview();
+ QDialog::accept();
+ }
}
void VisuGUI_CutPlanesDlg::reject() {
+ myScalarPane->deletePreview();
QDialog::reject();
}