myIsShrinkable = false;
myIsShrunk = false;
- myControlsPrecision = (long)SMESH::GetFloat( "SMESH:controls_precision", -1 );
+ myControlsPrecision = -1;
+ SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
+ if ( mgr && mgr->booleanValue( "SMESH", "use_precision", false ) )
+ myControlsPrecision = (long)SMESH::GetFloat( "SMESH", "controls_precision", -1 );
float aPointSize = SMESH::GetFloat("SMESH:node_size",3);
float aLineWidth = SMESH::GetFloat("SMESH:element_width",1);
myScalarBarActor->SetVisibility(false);
myScalarBarActor->SetLookupTable(myLookupTable);
- SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
+ mgr = SUIT_Session::session()->resourceMgr();
if( !mgr )
return;
if( !mgr )
return false;
- QString aMode = mgr->stringValue( "SMESH", "display_mode" );
+ int aMode = mgr->integerValue( "SMESH", "display_mode" );
SetRepresentation(-1);
- if(aMode.compare("Wireframe") == 0){
+ if(aMode == 0){
SetRepresentation(eEdge);
- }else if(aMode.compare("Shading") == 0){
+ }else if(aMode == 1){
SetRepresentation(eSurface);
- }else if(aMode.compare("Nodes") == 0){
+ }else if(aMode == 2){
SetRepresentation(ePoint);
}
- if(aMode == "Shrink"){
+ if(aMode == 3){
SetShrink();
}
{
int genTab = addPreference( tr( "PREF_TAB_GENERAL" ) );
+ int updateGroup = addPreference( tr( "PREF_GROUP_UPDATE" ), genTab );
+ addPreference( tr( "PREF_AUTO_UPDATE" ), updateGroup, SalomeApp_Preferences::Bool, "SMESH", "auto_update" );
+
int qaGroup = addPreference( tr( "PREF_GROUP_QUALITY" ), genTab );
addPreference( tr( "PREF_DISPLAY_ENTITY" ), qaGroup, SalomeApp_Preferences::Bool, "SMESH", "display_entity" );
- addPreference( tr( "PREF_AUTO_UPDATE" ), qaGroup, SalomeApp_Preferences::Bool, "SMESH", "auto_update" );
-
+ addPreference( tr( "PREF_PRECISION_USE" ), qaGroup, SalomeApp_Preferences::Bool, "SMESH", "use_precision" );
+
int precGroup = addPreference( tr( "PREF_GROUP_PRECISION" ), genTab );
setPreferenceProperty( precGroup, "columns", 1 );
- addPreference( tr( "PREF_PRECISION_USE" ), precGroup, SalomeApp_Preferences::Bool );
int prec = addPreference( tr( "PREF_PRECISION_VALUE" ), precGroup, SalomeApp_Preferences::IntSpin, "SMESH", "controls_precision" );
setPreferenceProperty( prec, "min", 0 );
modes.append( "Shading" );
modes.append( "Shrink" );
modes.append( "Nodes" );
+ QValueList<QVariant> indices;
+ indices.append( 0 );
+ indices.append( 1 );
+ indices.append( 2 );
+ indices.append( 3 );
setPreferenceProperty( dispmode, "strings", modes );
+ setPreferenceProperty( dispmode, "indexes", indices );
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab );
QStringList orients;
orients.append( tr( "SMESH_VERTICAL" ) );
orients.append( tr( "SMESH_HORIZONTAL" ) );
- QValueList<QVariant> indices; indices.append( 0 ); indices.append( 1 );
+ indices.clear(); indices.append( 0 ); indices.append( 1 );
setPreferenceProperty( orient, "strings", orients );
setPreferenceProperty( orient, "indexes", indices );