mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 01:20:34 +05:00
Preferences-Mesh-General tab: regressions and reorganization.
This commit is contained in:
parent
9d28d73b09
commit
1809a8e762
@ -116,7 +116,10 @@ SMESH_ActorDef::SMESH_ActorDef()
|
||||
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);
|
||||
@ -278,7 +281,7 @@ SMESH_ActorDef::SMESH_ActorDef()
|
||||
myScalarBarActor->SetVisibility(false);
|
||||
myScalarBarActor->SetLookupTable(myLookupTable);
|
||||
|
||||
SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
|
||||
mgr = SUIT_Session::session()->resourceMgr();
|
||||
if( !mgr )
|
||||
return;
|
||||
|
||||
@ -743,18 +746,18 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj,
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -2802,14 +2802,16 @@ void SMESHGUI::createPreferences()
|
||||
{
|
||||
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 );
|
||||
@ -2822,7 +2824,13 @@ void SMESHGUI::createPreferences()
|
||||
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 );
|
||||
@ -2909,7 +2917,7 @@ void SMESHGUI::createPreferences()
|
||||
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 );
|
||||
|
||||
|
@ -2742,6 +2742,9 @@ msgstr "Display Mode Toolbar"
|
||||
msgid "SMESHGUI::PREF_TAB_GENERAL"
|
||||
msgstr "General"
|
||||
|
||||
msgid "SMESHGUI::PREF_GROUP_UPDATE"
|
||||
msgstr "Update"
|
||||
|
||||
msgid "SMESHGUI::PREF_GROUP_QUALITY"
|
||||
msgstr "Quality controls"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user