// For now "complete" is implemented
Rescale( visible, visible.isEmpty() );
+#ifdef _DEBUG
MESSAGE("Time after rescale:" << t1.elapsed());
+#endif
}
QVector<int> HYDROGUI_ShapeBathymetry::selected() const
QVector<int> selected;
selected.reserve( myCoords->Size() );
+ Handle(AIS_InteractiveObject) obj = getAISObjects().first();
+
Handle(AIS_InteractiveContext) c = getContext();
if( !c.IsNull() )
{
{
Handle(HYDROGUI_BathymetryPointOwner) anOwner =
Handle(HYDROGUI_BathymetryPointOwner)::DownCast( lc->SelectedOwner() );
- if( anOwner )
+ if( !anOwner.IsNull() && anOwner->Selectable()==obj )
selected.append( anOwner->GetIndex() );
}
}
void HYDROGUI_ShapeBathymetry::Rescale( double theMin, double theMax )
{
- getContext()->ClearSelected();
+ getContext()->ClearSelected(true);
myMin = qMin( theMin, theMax );
myMax = qMax( theMin, theMax );
setToUpdateColorScale( true );
if( !getAISObjects().isEmpty() )
- getAISObjects()[0]->Redisplay();
+ {
+ getContext()->RecomputePrsOnly( getAISObjects()[0], true );
+ //getAISObjects()[0]->Redisplay();
+}
}
void HYDROGUI_ShapeBathymetry::RescaleDefault()
buildShape();
}
-void HYDROGUI_ShapeBathymetry::TextLabels( bool isOn )
+void HYDROGUI_ShapeBathymetry::TextLabels( bool isOn, bool isUpdateCurrentViewer )
{
if( getAISObjects().isEmpty() )
return;
if( isOn )
selection = selected();
- getContext()->ClearSelected();
+
+ //getContext()->ClearSelected(true);
prs->SetTextLabels( selection );
- prs->Redisplay();
+ getContext()->RecomputePrsOnly( prs, Standard_False, Standard_False );
+ //prs->Redisplay();
+ if( isUpdateCurrentViewer )
getContext()->UpdateCurrentViewer();
}