#include <OCCViewer_ViewModel.h>
#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
#include <SalomeApp_Study.h>
#include <SALOME_InteractiveObject.hxx>
if ( !vw )
return;
+ SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
+ bool anAutoBringToFront = aResourceMgr->booleanValue( "Geometry", "auto_bring_to_front", false );
+
Handle(AIS_InteractiveContext) ic = vw->getAISContext();
// "entry - list_of_int" map for LOCAL selection
else
ic->AddOrRemoveSelected( Handle(AIS_InteractiveObject)::DownCast(owner->Selectable()), false );
}
+
ic->SetAutomaticHilight(isAutoHilight); //Bug 17269: restore mode
- if (n < 3000)
- ic->HilightSelected(/*updateviewer*/Standard_True);
- else
- vw->update();
+
+ //rnv: In case Automatic Bring To Front viewer will be updated later
+ if(!anAutoBringToFront) {
+ if (n < 3000)
+ ic->HilightSelected(Standard_True);
+ else
+ vw->update();
+ }
// fill extra selected
mySelectedExternals.clear();
}
}
}
- UpdateColorScale();
+ UpdateColorScale(false,false);
}
void GEOM_Displayer::AfterErase( SALOME_View* v, const SALOME_OCCPrs* p )
{
LightApp_Displayer::AfterErase( v, p );
- UpdateColorScale();
+ UpdateColorScale(false,false);
}
//=================================================================
}
}
-void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps )
+void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, const bool updateViewer )
{
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
if( !aStudy )
}
}
}
-
- UpdateViewer();
+ if(updateViewer)
+ UpdateViewer();
}
SALOME_View* = 0);
/* Update visibility and parameters of the currently selected field step's color scale */
- void UpdateColorScale( const bool theIsRedisplayFieldSteps = false );
+ void UpdateColorScale( const bool theIsRedisplayFieldSteps = false, const bool updateViewer = true );
protected:
/* internal methods */
{
GEOM_Displayer aDisplayer( aStudy );
bool anIsRedisplayFieldSteps = param == QString("scalar_bar_nb_intervals");
- aDisplayer.UpdateColorScale( anIsRedisplayFieldSteps );
+ aDisplayer.UpdateColorScale( anIsRedisplayFieldSteps, true );
}
}
}