mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +05:00
Fix remarks related to the "0021757: EDF 1829 : Activate bring to front action on simple selection of an object" issue.
This commit is contained in:
parent
2a044ae940
commit
e0f9a7efdc
@ -30,6 +30,7 @@
|
||||
#include <OCCViewer_ViewModel.h>
|
||||
|
||||
#include <SUIT_Session.h>
|
||||
#include <SUIT_ResourceMgr.h>
|
||||
#include <SalomeApp_Study.h>
|
||||
#include <SALOME_InteractiveObject.hxx>
|
||||
|
||||
@ -197,6 +198,9 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
|
||||
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
|
||||
@ -335,11 +339,16 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
|
||||
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();
|
||||
|
@ -1590,13 +1590,13 @@ void GEOM_Displayer::AfterDisplay( SALOME_View* v, const SALOME_OCCPrs* p )
|
||||
}
|
||||
}
|
||||
}
|
||||
UpdateColorScale();
|
||||
UpdateColorScale(false,false);
|
||||
}
|
||||
|
||||
void GEOM_Displayer::AfterErase( SALOME_View* v, const SALOME_OCCPrs* p )
|
||||
{
|
||||
LightApp_Displayer::AfterErase( v, p );
|
||||
UpdateColorScale();
|
||||
UpdateColorScale(false,false);
|
||||
}
|
||||
|
||||
//=================================================================
|
||||
@ -2415,7 +2415,7 @@ Standard_Boolean GEOM_Displayer::FindColor( const Standard_Real aValue,
|
||||
}
|
||||
}
|
||||
|
||||
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 )
|
||||
@ -2552,6 +2552,6 @@ void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpdateViewer();
|
||||
if(updateViewer)
|
||||
UpdateViewer();
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ public:
|
||||
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 */
|
||||
|
@ -2546,7 +2546,7 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
|
||||
{
|
||||
GEOM_Displayer aDisplayer( aStudy );
|
||||
bool anIsRedisplayFieldSteps = param == QString("scalar_bar_nb_intervals");
|
||||
aDisplayer.UpdateColorScale( anIsRedisplayFieldSteps );
|
||||
aDisplayer.UpdateColorScale( anIsRedisplayFieldSteps, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user