mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-29 10:50:34 +05:00
PAL13460 (PAL EDF 301 force the mesh to go through a point)
notify on invalid parameters
This commit is contained in:
parent
4ddea8ded4
commit
170a5c7165
@ -55,6 +55,7 @@
|
|||||||
#include "SalomeApp_Tools.h"
|
#include "SalomeApp_Tools.h"
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include "SUIT_ResourceMgr.h"
|
||||||
#include "SUIT_OverrideCursor.h"
|
#include "SUIT_OverrideCursor.h"
|
||||||
|
#include "SUIT_MessageBox.h"
|
||||||
|
|
||||||
// OCCT Includes
|
// OCCT Includes
|
||||||
#include <TColStd_MapOfInteger.hxx>
|
#include <TColStd_MapOfInteger.hxx>
|
||||||
@ -141,9 +142,9 @@ QFrame* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
|
|||||||
aZLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs );
|
aZLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs );
|
||||||
myZ = new SMESHGUI_SpinBox(aCoordGrp);
|
myZ = new SMESHGUI_SpinBox(aCoordGrp);
|
||||||
|
|
||||||
myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3);
|
myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3);
|
myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3);
|
myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
|
|
||||||
// Method selection
|
// Method selection
|
||||||
|
|
||||||
@ -320,6 +321,7 @@ void SMESHGUI_MakeNodeAtPointOp::stopOperation()
|
|||||||
// myMeshActor->SetRepresentation( myMeshOldDisplayMode );
|
// myMeshActor->SetRepresentation( myMeshOldDisplayMode );
|
||||||
myMeshActor->SetPointRepresentation(false);
|
myMeshActor->SetPointRepresentation(false);
|
||||||
SMESH::RepaintCurrentView();
|
SMESH::RepaintCurrentView();
|
||||||
|
myMeshActor = 0;
|
||||||
}
|
}
|
||||||
SMESHGUI_SelectionOp::stopOperation();
|
SMESHGUI_SelectionOp::stopOperation();
|
||||||
}
|
}
|
||||||
@ -332,9 +334,20 @@ void SMESHGUI_MakeNodeAtPointOp::stopOperation()
|
|||||||
|
|
||||||
bool SMESHGUI_MakeNodeAtPointOp::onApply()
|
bool SMESHGUI_MakeNodeAtPointOp::onApply()
|
||||||
{
|
{
|
||||||
if ( !isValid() ) return false; // node id is invalid
|
if ( !myMeshActor ) {
|
||||||
|
SUIT_MessageBox::warn1( dlg(), tr( "SMESH_WRN_WARNING" ),
|
||||||
|
tr("INVALID_MESH"), tr( "SMESH_BUT_OK" ) );
|
||||||
|
dlg()->show();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !isValid() ) { // node id is invalid
|
||||||
|
SUIT_MessageBox::warn1( dlg(), tr( "SMESH_WRN_WARNING" ),
|
||||||
|
tr("INVALID_ID"), tr( "SMESH_BUT_OK" ) );
|
||||||
|
dlg()->show();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !myMeshActor ) return true;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(myMeshActor->getIO());
|
SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(myMeshActor->getIO());
|
||||||
@ -383,7 +396,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
|
|||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Check data validity
|
* \brief Check selected node id validity
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
|
@ -1551,6 +1551,12 @@ msgstr "ID"
|
|||||||
msgid "SMESHGUI_MakeNodeAtPointDlg::AUTO_SEARCH"
|
msgid "SMESHGUI_MakeNodeAtPointDlg::AUTO_SEARCH"
|
||||||
msgstr "Automatic search"
|
msgstr "Automatic search"
|
||||||
|
|
||||||
|
msgid "SMESHGUI_MakeNodeAtPointOp::INVALID_ID"
|
||||||
|
msgstr "Node ID is invalid"
|
||||||
|
|
||||||
|
msgid "SMESHGUI_MakeNodeAtPointOp::INVALID_MESH"
|
||||||
|
msgstr "Mesh to modify not selected"
|
||||||
|
|
||||||
#----------------------------------------------------
|
#----------------------------------------------------
|
||||||
|
|
||||||
msgid "SMESHGUI_DeleteGroupDlg::CAPTION"
|
msgid "SMESHGUI_DeleteGroupDlg::CAPTION"
|
||||||
|
Loading…
Reference in New Issue
Block a user