X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI.cxx;h=c697a08ceb5512b6cc03aa84212d084c37d67923;hp=b4a75cb4dd97d6b84bf532bf65ed155e95736149;hb=cc85955178440fffe36eef234d759e3c3590248f;hpb=48b83422af7a5230409e39f4f2ece322b199128b diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index b4a75cb4d..c697a08ce 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -120,6 +120,7 @@ #include #include #include +#include #include #include #include @@ -2540,6 +2541,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) #ifndef DISABLE_PLOT2DVIEWER SMESH::ProcessIn2DViewers(anActor,SMESH::RemoveFrom2dViewer); #endif + anActor->UpdateFilter(); } } } @@ -2726,6 +2728,10 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) else aSel->setSelectedObjects( to_process ); + if ( vtkwnd && vtkwnd->GetRenderer() && !isStudyLocked() && + ( theCommandID==SMESHOp::OpShow || theCommandID==SMESHOp::OpShowOnly ) ) + vtkwnd->GetRenderer()->AdjustActors(); + break; } @@ -4986,9 +4992,9 @@ void SMESHGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& ti _PTR(Study) study = appStudy->studyDS(); _PTR(SObject) obj = study->FindObjectID( io->getEntry() ); if ( obj ) { - QString aName = QString( SMESH::fromUtf8(obj->GetName()) ); - while ( aName.at( aName.length() - 1 ) == ' ' ) // Remove extraspaces in Name of Popup - aName.remove( (aName.length() - 1), 1 ); + QString aName = SMESH::fromUtf8( obj->GetName()); + while ( !aName.isEmpty() && aName.at( aName.length() - 1 ) == ' ' ) // Remove extraspaces in Name of Popup + aName.remove(( aName.length() - 1 ), 1 ); title = aName; } } @@ -5086,6 +5092,9 @@ void SMESHGUI::createPreferences() int dispgroup = addPreference( tr( "PREF_DISPLAY_MODE_GROUP" ), genTab ); setPreferenceProperty( dispgroup, "columns", 2 ); + + addPreference( tr( "PREF_FITALL_ON_DISPLAYONLY" ), dispgroup, LightApp_Preferences::Bool, "SMESH", "fitall_on_displayonly" ); + int dispmode = addPreference( tr( "PREF_DISPLAY_MODE" ), dispgroup, LightApp_Preferences::Selector, "SMESH", "display_mode" ); QStringList modes; modes.append( tr("MEN_WIRE") ); @@ -5471,13 +5480,13 @@ void SMESHGUI::preferencesChanged( const QString& sect, const QString& name ) std::string aWarning; SUIT_ResourceMgr* aResourceMgr = SMESH::GetResourceMgr(this); - if ( name== "selection_object_color" || - name=="selection_element_color" || - name== "highlight_color" || - name=="selection_precision_node" || - name=="selection_precision_element" || - name=="selection_precision_object" || - name=="selection_increment") + if ( name == "selection_object_color" || + name == "selection_element_color" || + name == "highlight_color" || + name == "selection_precision_node" || + name == "selection_precision_element" || + name == "selection_precision_object" || + name == "selection_increment") { SMESH::UpdateSelectionProp( this ); }