LineEditElements = new QLineEdit(GroupArguments);
LineEditElements->setValidator(myIdValidator);
- QPushButton* filterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
- connect(filterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
+ myFilterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
+ connect(myFilterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
// Control for the whole mesh selection
CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
GroupArgumentsLayout->addWidget(TextLabelElements, 0, 0);
GroupArgumentsLayout->addWidget(SelectElementsButton, 0, 1);
GroupArgumentsLayout->addWidget(LineEditElements, 0, 2);
- GroupArgumentsLayout->addWidget(filterBtn, 0, 3);
+ GroupArgumentsLayout->addWidget(myFilterBtn, 0, 3);
GroupArgumentsLayout->addWidget(CheckBoxMesh, 1, 0, 1, 4);
GroupArgumentsLayout->addWidget(GroupAxis, 2, 0, 1, 4);
GroupArgumentsLayout->addWidget(GroupAngleBox, 3, 0, 1, 4);
LineEditElements->clear();
myElementsId = "";
myNbOkElements = 0;
+ myIDs.clear();
myActor = 0;
myMesh = SMESH::SMESH_Mesh::_nil();
//=================================================================================
void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId)
{
- //disconnect(mySelectionMgr, 0, this, 0);
+ disconnect(mySelectionMgr, 0, this, 0);
- SALOME_ListIO io;
+ /* SALOME_ListIO io;
mySelectionMgr->selectedObjects( io );
SALOME_ListIO aList;
- mySelectionMgr->setSelectedObjects( aList );
-// LineEditElements->clear();
- myNbOkElements = 0;
+ mySelectionMgr->setSelectedObjects( aList );*/
+
buttonApply->setEnabled(false);
buttonOk->setEnabled(false);
mySimulation->SetVisibility(false);
if (!CheckBoxMesh->isChecked())
{
+ LineEditElements->clear();
+ myIDs.clear();
+ myNbOkElements = 0;
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(aSelMode);
}
if (CheckBoxMesh->isChecked())
onSelectMesh(true);
- //connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
- mySelectionMgr->setSelectedObjects( io );
+ connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ // mySelectionMgr->setSelectedObjects( io );
}
//=================================================================================
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
} else {
int aConstructorId = GetConstructorId();
+ myEditCurrentArgument = (QWidget*)SpinBox_X;
if (aConstructorId == 0)
{
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
//=======================================================================
void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
{
- if (toSelectMesh)
+ if (toSelectMesh) {
+ myIDs = LineEditElements->text();
TextLabelElements->setText(tr("SMESH_NAME"));
+ }
else
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
+ myFilterBtn->setEnabled(!toSelectMesh);
if (myEditCurrentArgument != LineEditElements) {
LineEditElements->clear();
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(EdgeSelection);
}
- else if (aConstructorId == 0)
+ else if (aConstructorId == 1)
{
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(FaceSelection);
}
SelectionIntoArgument();
+
+ if (!toSelectMesh)
+ LineEditElements->setText( myIDs );
}
//=================================================================================
//=================================================================================
void SMESHGUI_RevolutionDlg::setFilters()
{
+ if(myMesh->_is_nil()) {
+ SUIT_MessageBox::critical(this,
+ tr("SMESH_ERROR"),
+ tr("NO_MESH_SELECTED"));
+ return;
+ }
if ( !myFilterDlg )
{
QList<int> types;