#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
#include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
GroupArgumentsLayout->setSpacing(SPACING);
GroupArgumentsLayout->setMargin(MARGIN);
+ myIdValidator = new SMESHGUI_IdValidator(this);
+
// Controls for elements selection
TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments);
SelectElementsButton = new QPushButton(GroupArguments);
SelectElementsButton->setIcon(image3);
LineEditElements = new QLineEdit(GroupArguments);
- LineEditElements->setValidator(new SMESHGUI_IdValidator(this));
+ LineEditElements->setValidator(myIdValidator);
// Control for the whole mesh selection
CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
GroupMirrorLayout->addWidget(SpinBox_DZ, 1, 7);
// switch of action type
- ActionBox = new QGroupBox(tr("ACTION"), GroupArguments);
+ ActionBox = new QGroupBox(GroupArguments);
ActionGroup = new QButtonGroup(GroupArguments);
QVBoxLayout* ActionBoxLayout = new QVBoxLayout(ActionBox);
ActionBoxLayout->addSpacing(SPACING);
GroupArgumentsLayout->addWidget(CheckBoxMesh, 1, 0, 1, 4);
GroupArgumentsLayout->addWidget(GroupMirror, 2, 0, 1, 4);
GroupArgumentsLayout->addWidget(ActionBox, 3, 0, 3, 3);
- GroupArgumentsLayout->addWidget(MakeGroupsCheck, 4, 4);
- GroupArgumentsLayout->addWidget(LineEditNewMesh, 5, 4);
+ GroupArgumentsLayout->addWidget(MakeGroupsCheck, 4, 3);
+ GroupArgumentsLayout->addWidget(LineEditNewMesh, 5, 3);
/***************************************************************/
GroupButtons = new QGroupBox(this);
GroupButtonsLayout->setSpacing(SPACING);
GroupButtonsLayout->setMargin(MARGIN);
- buttonOk = new QPushButton(tr("SMESH_BUT_OK"), GroupButtons);
+ buttonOk = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), GroupButtons);
buttonOk->setAutoDefault(true);
buttonOk->setDefault(true);
buttonApply = new QPushButton(tr("SMESH_BUT_APPLY"), GroupButtons);
bool makeGroups = ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() );
try {
+ SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
- QApplication::setOverrideCursor(Qt::WaitCursor);
+
switch ( actionButton ) {
case MOVE_ELEMS_BUTTON:
aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false );
aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups,
LineEditNewMesh->text().toLatin1().data());
}
- QApplication::restoreOverrideCursor();
} catch (...) {
}
aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
LineEditElements->setReadOnly(true);
+ LineEditElements->setValidator(0);
} else {
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(CellSelection);
LineEditElements->setReadOnly(false);
+ LineEditElements->setValidator(myIdValidator);
onTextChange(LineEditElements->text());
}