const bool the3d2d,
bool theDoInit):
SMESHGUI_PreviewDlg(theModule),
- mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
+ mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySMESHGUI(theModule)
{
setModal(false);
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), SLOT( onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), SLOT( onCloseView()));
// dialog controls
connect(myFilterBtn, SIGNAL(clicked()), SLOT(onFilterBtn() ));
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_MultiEditDlg::onOpenView()
+{
+ if(!mySelector) {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ mySMESHGUI->EmitSignalDeactivateDialog();
+ setEnabled(true);
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_MultiEditDlg::onCloseView()
+{
+ onDeactivate();
+ mySelector = 0;
+}
+
+
//=================================================================================
// function : onHelp()
// purpose :
void SMESHGUI_MultiEditDlg::enterEvent (QEvent*)
{
if (!isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
mySMESHGUI->EmitSignalDeactivateDialog();
setEnabled(true);
setSelectionMode();
//=======================================================================
bool SMESHGUI_MultiEditDlg::isIdValid (const int theId) const
{
+ if ( !myActor )
+ return true; // filter can't work w/o actor
+
SVTK_Selector* aSelector = SMESH::GetSelector();
Handle(SMESHGUI_Filter) aFilter =
Handle(SMESHGUI_Filter)::DownCast(aSelector->GetFilter(myFilterType));
int SMESHGUI_ChangeOrientationDlg::nbElemsInMesh()
{
- return ( myFilterType = SMESH::FaceFilter ) ? myMesh->NbFaces() : myMesh->NbVolumes();
+ return ( myFilterType == SMESH::FaceFilter ) ? myMesh->NbFaces() : myMesh->NbVolumes();
}
/*!
QLabel* dXLbl = new QLabel( tr("SMESH_DX"), myFacetSelGrp);
QLabel* dYLbl = new QLabel( tr("SMESH_DY"), myFacetSelGrp);
QLabel* dZLbl = new QLabel( tr("SMESH_DZ"), myFacetSelGrp);
- QPushButton* axisBtn[3];
for ( int i = 0; i < 3; ++i )
{
myPointSpin[i] = new SMESHGUI_SpinBox( myFacetSelGrp );
if ( sender() == myAxisBtn[i] )
break;
if ( i == 3 )
- i == 0;
+ i = 0;
myDirSpin[i]->SetValue(1.);
if ( myActor && !myMesh->_is_nil() && myMesh->NbNodes() > 0 )