mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 02:00:34 +05:00
PAL10513. Desable tabs according to shape dimention at edition as well
This commit is contained in:
parent
52c4d72583
commit
773894ff04
@ -276,15 +276,19 @@ void SMESHGUI_MeshOp::selectionDone()
|
|||||||
// Enable tabs according to shape dimension
|
// Enable tabs according to shape dimension
|
||||||
|
|
||||||
int shapeDim = 3;
|
int shapeDim = 3;
|
||||||
if ( myToCreate )
|
|
||||||
{
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
GEOM::GEOM_Object_var aGeomVar;
|
||||||
QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
|
QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
|
||||||
_PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.latin1() );
|
_PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.latin1() );
|
||||||
if ( pGeom ) {
|
if ( pGeom ) {
|
||||||
GEOM::GEOM_Object_var aGeomVar =
|
aGeomVar = GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
|
||||||
GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
|
}
|
||||||
|
else {
|
||||||
|
QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
|
||||||
|
_PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.latin1() );
|
||||||
|
aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
|
||||||
|
}
|
||||||
if ( !aGeomVar->_is_nil() ) {
|
if ( !aGeomVar->_is_nil() ) {
|
||||||
shapeDim = 0;
|
shapeDim = 0;
|
||||||
switch ( aGeomVar->GetShapeType() ) {
|
switch ( aGeomVar->GetShapeType() ) {
|
||||||
@ -310,7 +314,6 @@ void SMESHGUI_MeshOp::selectionDone()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch ( const SALOME::SALOME_Exception& S_ex )
|
catch ( const SALOME::SALOME_Exception& S_ex )
|
||||||
{
|
{
|
||||||
SalomeApp_Tools::QtCatchCorbaException( S_ex );
|
SalomeApp_Tools::QtCatchCorbaException( S_ex );
|
||||||
@ -318,7 +321,6 @@ void SMESHGUI_MeshOp::selectionDone()
|
|||||||
catch ( ... )
|
catch ( ... )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
||||||
myDlg->setMaxHypoDim( shapeDim );
|
myDlg->setMaxHypoDim( shapeDim );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user