X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_ExtrusionDlg.cxx;h=38b36d060c79d521335a4a97d3f4fd98660e163b;hp=0a7901267b630e6cb8e1900e3a7fbda257f10be7;hb=5482b99d07dd144fd5be299e722f39a81de3b5be;hpb=a713f0b919f062a1c9839670d4b51639c8133940 diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx index 0a7901267..38b36d060 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx @@ -397,7 +397,7 @@ void SMESHGUI_3TypesSelector::addTmpIdSource( SMESH::long_array_var& ids, int iT SMESH::SMESH_IDSource_var idSrc = aMeshEditor->MakeIDSource( ids, SMESH::ElementType( iType+1 )); - if ( myIDSource[ iType ]->length() <= index ) + if ( (int) myIDSource[ iType ]->length() <= index ) myIDSource[ iType ]->length( index + 1 ); myIDSource[ iType ][ index ] = idSrc; @@ -777,7 +777,9 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule) connect(SelectorWdg, SIGNAL(selectionChanged()), this, SLOT(toDisplaySimulation())); connect(SelectorWdg, SIGNAL(selectionChanged()), this, SLOT(CheckIsEnable())); /* to close dialog if study change */ - connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject())); + connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject())); + connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), this, SLOT(onOpenView())); + connect(mySMESHGUI, SIGNAL(SignalCloseView()), this, SLOT(onCloseView())); connect(SpinBox_Dx, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation())); connect(SpinBox_Dy, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation())); @@ -1119,6 +1121,31 @@ void SMESHGUI_ExtrusionDlg::reject() QDialog::reject(); } +//================================================================================= +// function : onOpenView() +// purpose : +//================================================================================= +void SMESHGUI_ExtrusionDlg::onOpenView() +{ + if ( mySelector ) { + SMESH::SetPointRepresentation(false); + } + else { + mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector(); + ActivateThisDialog(); + } +} + +//================================================================================= +// function : onCloseView() +// purpose : +//================================================================================= +void SMESHGUI_ExtrusionDlg::onCloseView() +{ + DeactivateActiveDialog(); + mySelector = 0; +} + //================================================================================= // function : ClickOnHelp() // purpose : @@ -1240,12 +1267,17 @@ void SMESHGUI_ExtrusionDlg::ActivateThisDialog() //================================================================================= // function : enterEvent() -// purpose : Mouse enter event +// purpose : //================================================================================= void SMESHGUI_ExtrusionDlg::enterEvent (QEvent*) { - if (!GroupButtons->isEnabled()) + if ( !GroupButtons->isEnabled() ) { + SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ); + if ( aViewWindow && !mySelector) { + mySelector = aViewWindow->GetSelector(); + } ActivateThisDialog(); + } } //=================================================================================