case BathymetryTextId:
{
foreach( Handle(HYDROGUI_BathymetryPrs) bath, baths )
- bath->GetShape()->TextLabels( isActivate );
+ bath->GetShape()->TextLabels( isActivate, bath==baths.last() );
//commit();
if( isActivate )
connect( selectionMgr(), SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
if( myMode==BathymetryTextId )
{
foreach( Handle(HYDROGUI_BathymetryPrs) bath, baths )
- bath->GetShape()->TextLabels( true );
+ bath->GetShape()->TextLabels( true, bath==baths.last() );
}
qApp->restoreOverrideCursor();
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() );
}
}
buildShape();
}
-void HYDROGUI_ShapeBathymetry::TextLabels( bool isOn )
+void HYDROGUI_ShapeBathymetry::TextLabels( bool isOn, bool isUpdateCurrentViewer )
{
if( getAISObjects().isEmpty() )
return;
//getContext()->ClearSelected();
prs->SetTextLabels( selection );
- getContext()->RecomputePrsOnly( prs );
+ getContext()->RecomputePrsOnly( prs, Standard_False, Standard_False );
//prs->Redisplay();
- getContext()->UpdateCurrentViewer();
+ if( isUpdateCurrentViewer )
+ getContext()->UpdateCurrentViewer();
}
// Default re-scale (by all points)
void RescaleDefault();
- void TextLabels( bool isOn );
+ void TextLabels( bool isOn, bool isUpdateCurrentViewer=true );
virtual void display( const bool theIsUpdateViewer = true );
virtual void erase( const bool theIsUpdateViewer = true );