module()->setObjectVisible( (size_t)aVTKMgr->getViewModel(), aBathymetryObj, true );
}
- theUpdateFlags = UF_Model | UF_VTKViewer | UF_VTK_Forced;
+ theUpdateFlags = UF_Model | UF_FitAll | UF_VTKViewer | UF_VTK_Init | UF_VTK_Forced;
return true;
}
QString anObjectName = aPanel->getObjectName().simplified();
if ( anObjectName.isEmpty() )
{
- anObjectName = HYDROGUI_Tool::GenerateObjectName( module(), tr( "DEFAULT_BATHYMETRY_NAME" ) );
+ anObjectName = aPanel->getFileName();
+ if ( !anObjectName.isEmpty() ) {
+ anObjectName = QFileInfo( anObjectName ).baseName();
+ }
+
+ if ( anObjectName.isEmpty() ) {
+ anObjectName = HYDROGUI_Tool::GenerateObjectName( module(), tr( "DEFAULT_BATHYMETRY_NAME" ) );
+ }
aPanel->setObjectName( anObjectName );
}
}