createAction( CreateChannelId, "CREATE_CHANNEL", "CREATE_CHANNEL_ICO" );
createAction( EditChannelId, "EDIT_CHANNEL", "EDIT_CHANNEL_ICO" );
- createAction( CreateDigueId, "CREATE_DIGUE" );
- createAction( EditDigueId, "EDIT_DIGUE" );
+ createAction( CreateDigueId, "CREATE_DIGUE", "CREATE_DIGUE_ICO" );
+ createAction( EditDigueId, "EDIT_DIGUE", "EDIT_DIGUE_ICO" );
createAction( ImportObstacleFromFileId, "IMPORT_OBSTACLE_FROM_FILE", "IMPORT_OBSTACLE_FROM_FILE_ICO" );
createAction( ImportGeomObjectId, "IMPORT_GEOM_OBJECT", "IMPORT_GEOM_OBJECT_ICO" );
createTool( separator(), aToolBar );
createTool( CreateChannelId, aToolBar );
+ createTool( CreateDigueId, aToolBar );
createTool( separator(), aToolBar );
createTool( CreateImmersibleZoneId, aToolBar );
bool HYDROGUI_Module::renameObject( const QString& theEntry, const QString& theName )
{
Handle(HYDROData_Entity) anEntity = getDataModel()->objectByEntry( theEntry );
- bool aRes = !anEntity.IsNull();
- if ( aRes )
+ bool aRes = false;
+ if ( !anEntity.IsNull() )
{
HYDROGUI_DataModel* aModel = getDataModel();
if( aModel )
{
// check that there are no other objects with the same name in the document
Handle(HYDROData_Entity) anObject = HYDROGUI_Tool::FindObjectByName( this, theName );
- aRes = anObject.IsNull();
- if ( aRes )
+ if ( anObject.IsNull() )
{
- aRes = aModel->rename( anEntity, theName );
+ SUIT_Operation* anOp = application()->activeStudy()->activeOperation();
+ if ( anOp && anOp->inherits( "HYDROGUI_CalculationOp" ) )
+ {
+ anEntity->SetName( theName );
+ aRes = true;
+ }
+ else
+ {
+ aRes = aModel->rename( anEntity, theName );
+ }
}
else
{