#include <QLabel>
#include <QRadioButton>
#include <QCheckBox>
+#include <QButtonGroup>
// VTK includes
#include <vtkProperty.h>
// constructor
QGroupBox* aPixGrp = new QGroupBox(tr("MESH_PASS_THROUGH_POINT"), aFrame);
+ QButtonGroup* aBtnGrp = new QButtonGroup(this);
QHBoxLayout* aPixGrpLayout = new QHBoxLayout(aPixGrp);
aPixGrpLayout->setMargin(MARGIN);
aPixGrpLayout->setSpacing(SPACING);
aRBut->setIcon(iconMoveNode);
aRBut->setChecked(true);
aPixGrpLayout->addWidget(aRBut);
+ aBtnGrp->addButton(aRBut, 0);
// coordinates
mySimulation->GetActor()->SetProperty(aProp);
aProp->Delete();
- SMESHGUI_SelectionOp::startOperation();
-
// SalomeApp_TypeFilter depends on a current study
if ( myFilter ) delete myFilter;
QList<SUIT_SelectionFilter*> filters;
vertexType.Add( TopAbs_VERTEX );
filters.append( new SMESH_NumberFilter("GEOM", TopAbs_VERTEX, 1, vertexType ));
myFilter = new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
-
- activateSelection(); // set filters
+
+ // IPAL19360
+ SMESHGUI_SelectionOp::startOperation(); // this method should be called only after filter creation
+ //activateSelection(); // set filters // called inside of previous statement
myDlg->myX->SetValue(0);
myDlg->myY->SetValue(0);
return false;
}
- if ( !isValid() ) { // node id is invalid
- SUIT_MessageBox::warning( dlg(), tr( "SMESH_WRN_WARNING" ),
- tr("INVALID_ID") );
+ QString msg;
+ if ( !isValid( msg ) ) { // node id is invalid
+ if( !msg.isEmpty() )
+ SUIT_MessageBox::warning( dlg(), tr( "SMESH_WRN_WARNING" ),
+ tr("INVALID_ID") );
dlg()->show();
return false;
}
}
if (aResult)
{
+ QStringList aParameters;
+ aParameters << myDlg->myX->text();
+ aParameters << myDlg->myY->text();
+ aParameters << myDlg->myZ->text();
+ aMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) );
+
myDlg->myId->setText("");
SALOME_ListIO aList;
*/
//================================================================================
-bool SMESHGUI_MakeNodeAtPointOp::isValid()
+bool SMESHGUI_MakeNodeAtPointOp::isValid( QString& msg )
{
bool ok = true;
-
if ( myMeshActor &&
myDlg->myMoveRBtn->isDown() &&
!myDlg->myAutoSearchChkBox->isChecked() )
if ( id > 0 )
if (SMDS_Mesh* aMesh = myMeshActor->GetObject()->GetMesh())
ok = aMesh->FindNode( id );
+ if( !ok )
+ msg += tr("INVALID_ID") + "\n";
}
+
+ ok = myDlg->myX->isValid( msg, !myNoPreview ) && ok;
+ ok = myDlg->myY->isValid( msg, !myNoPreview ) && ok;
+ ok = myDlg->myZ->isValid( msg, !myNoPreview ) && ok;
+
return ok;
}
const bool preview = myDlg->myPreviewChkBox->isChecked();
if ( autoSearch )
myDlg->myId->setText("");
- if ( preview && ( autoSearch || isValid() ))
+ QString msg;
+ if ( preview && ( autoSearch || isValid( msg ) ))
{
try {
SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(myMeshActor->getIO());