From 0072aa3b6a1bbc99e7b09aa549d70d15372f288e Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 17 Nov 2016 13:22:21 +0300 Subject: [PATCH] Show All Annotations /Hide All Annotations action in Text Tree widget, help page for annotation. --- doc/salome/gui/GEOM/images/annotation.png | Bin 0 -> 14164 bytes .../gui/GEOM/images/annotation_preview.png | Bin 0 -> 9913 bytes doc/salome/gui/GEOM/input/annotation.doc | 48 ++++++++++ .../GEOM/input/using_measurement_tools.doc | 1 + src/GEOMGUI/GEOMGUI_AnnotationMgr.cxx | 83 +++++++++++++++--- src/GEOMGUI/GEOMGUI_AnnotationMgr.h | 16 +++- src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx | 22 +++-- src/GEOMGUI/GEOMGUI_TextTreeWdg.h | 2 + src/MeasureGUI/MeasureGUI.cxx | 50 ++++++----- 9 files changed, 178 insertions(+), 44 deletions(-) create mode 100644 doc/salome/gui/GEOM/images/annotation.png create mode 100644 doc/salome/gui/GEOM/images/annotation_preview.png create mode 100644 doc/salome/gui/GEOM/input/annotation.doc diff --git a/doc/salome/gui/GEOM/images/annotation.png b/doc/salome/gui/GEOM/images/annotation.png new file mode 100644 index 0000000000000000000000000000000000000000..584104fc36dfbe72197df9f215d5818833390142 GIT binary patch literal 14164 zcmZ|01ymhdwAtySqbhhc51YufO;A z-+jh7P^YR!?UKFLnrqHk5sLDXi12vu001CLeH2p$0H_%7iwg%0u0ejIHVXcGSl z3I_+bu%@sI{(NiyQOgP3eFpqSK$)W)YjeI7x<3kORbBD ztLe(OuRh!NChT(kq9o|wI`6&CZi3@e-2SAP>W`$$ZYv%ywNRtLiIK%=(kJ$t!U4b# zOwi9CRaI4Wbp?9-<{p;-w03RZnqZrl30Px}}BM}e6 z=c4pe!c}SBr1LlxgF`>wUB*in94(ucG9#cz_IL*f$E>My%JPJszk#mOj510-<%AdB z5gu4G857A@E~&Kh;|(>!iP?}C#A8i~VnVsQ*gHBr1c$)DkQQLnYr&T{3O z)mH^C;r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fMG^YGz#G&y!)vWLr(&te&^aI0a(3R~jhtHB+O)sB#r;!4OSw7-KjN3}UtKFXWydnMPh{T~Rs?Q! z8uj7<{*)vj6|lGjlC!k||9}8R)IfPqRa+E!F}nS0e*2epcTa$56PB~a^JD`+hC=Dy z)>QeW_G4A9sK|K6A`~Eu81q#$hvOZpn{5Gkuswn#Z%wKwW0G_}T;F>PcrA1k@U=0P zo?0=`E4k!;yjX>(Vc`D)t0Q|~ literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/images/annotation_preview.png b/doc/salome/gui/GEOM/images/annotation_preview.png new file mode 100644 index 0000000000000000000000000000000000000000..0cb50206deaf049f8d347f53143f36b1d0e77223 GIT binary patch literal 9913 zcmYLv1yqzz)b|1kh;&FwEJ!0DQc?;l-3Uu}cf-;h(jcLflF~>colBz#EUPn>0S+yHU}@QX&XB;3sdf#^YUkar)vv-TIf{7B9pu#OOg+c~jm z@|5h$Z_mn3rr7fbh~GWt`brO`c(0nMnYJoK`o7_7kY67w{WA3NMwvu!uq;|v@K;WY z232XD>}}`oR>z;q5vY74R0Fh{z`R-8Onu)PSaR z{Ez6Ux{!Q(FnE+Fq{n_DyZ;9p-p)vgGouPJ5x<&O@{KvJ(9`Ah>-36-?>A}+QlXdY zWb-`++3ua+-O(U9EZ7!7&Z{Up5EWdxZVvn~HuK$G4MN-5kG=hCC56K+U*ugk7orYi z4<8#@3sAoK*YW3bR&kXhkEqaJRnPlSE4Q2vKWV_@%dtcg6-^o87Sldh$|!Dun;yL? zhf;T8V6p*b|DW|b=s|TOeV}eh&qt4GHGYD@1U&M4v55!z)DP~7#|2D}``&YZj4>o7 zMhSurb_y`EcqMnGyS^BggO-mymGEYU9+s!z)f);mwpDrZtU@q!Tcn3}PGt`J{t^m(Rx^#7>Im^;(`qlmyZ5zwPD z|3fZ)hJqoRl|#N_RR-*DY)(RCgINVE-RGZq7Wv}d3N4GZc{z?nT-@yXFs+Bb6b?_zdD!+EPVx_@WTbXKBy)?L z*z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lwLFUJv5tU}hXyXMbzM$N_=gE$8H@$E}*FXx|qJlj# zN13tFgNpobS}|yJmQ!n@WTpCFCT@zd3_O)bFML^D`vwP)27?*rmG+a`gsb+SaM(f^ zSIhCf6NsmQJ3gnMJab|36;TO!DAG6VcYT149zMA)2IeyT(P=7Og@uOb)N{7OZ&1BD z+0JqmyJj7*dVO<`9Y2_?Cl(<|Lh?bpVe{|X7RXlfi zW2%?@ir*%UXXsBLC^CUC4-EwC6iJu3dYZ73yVg`8+_2Z**x~D03n{R5N+1Lk9Lzj2 z9&IRCkLhZQC@~<(=}2C(G{#88)DAjkd}&})U?f9IYBFlsiemUVbu~O2EsK=y;23-; z@*1%N#SeerGMN-cVj#ZDR?&MppHOgeVS(`3u;}y z%Ac6Bk$P)N@Ea@h^DhE4%sPi~Im zwcnZxx641BS|;1~)iYmbd3&HP_;e5$101oBf9;QzxbR|$>pw&%YqAF~ zVMs%E&bQN;KyHzT=!7Im3}{czAJFOF+Wz*=r|VDWK{-hHO#_K=FC`=J_rL5DB|&8t X% Annotation functionality allows showing in the viewer special user-defined text label connected to corresponding part of a CAD model with a line. + +\image html annotation_preview.png + +Shape annotation behavior are summarized below: +

    +
  • Annotation text is always parallel to the screen and horizontal.
  • +
  • Annotation text is not zoomed or rotated when a 3D scene is zoomed or rotated by the user.
  • +
  • The user is able to modify the font, the style, the color and the size of the annotation text and the color, the width and the style of the connection line applied to all annotations. +It can be accessed from the main menu via File -> Preferences. The Shape annotations group on Geometry Settings pane contains controls for it. +
  • +
  • The annotation text is defined using UTF-8 encoding and thus support any Unicode characters.
  • +
  • Position of an annotation in a 3D view is defined by dragging it with the mouse.
  • +
  • There are several algorithms for the annotation position calculation during the scene manipulations (panning, zooming, rotation):
  • +
      +
    • Algorithm 1: an annotation has fixed position in 2D screen coordinates (fixed screen position mode). In this mode, the annotations are always visible (appear as “topmost objects”), never hidden by the (annotated) geometry.
    • +
    • Algorithm 2: an annotation has fixed position in 3D model space, this position is projected onto the screen just as normal point coordinates. In this mode, some annotations may be invisible depending on the camera (position, orientation, zoom).
    • +
    +
  • Annotations appear in an Annotations sub-tree in Text Browser.
  • +
  • All annotations may be shown/hidden in a 3D view using corresponded popup menu on Annotations item in Text Browser.
  • +
  • Annotations of a shape may be shown/hidden in a 3D view using corresponded popup menu on the shape item in Object Browser.
  • +
  • Annotation is logically connected to the shape:
  • +
      +
    • Selection of an annotation will highlight corresponding shape/subshape in 3D view.
    • +
    • When the shape is deleted, the annotation will be also deleted.
    • +
    +
+ +It can be accessed from the main menu via Inspection -> Annotation + +\image html annotation.png "Create Annotation dialog" + +In this dialog you can: +
    +
  • Set Text text shown in View 3d and a name of annotation presented in the Text Browser.
  • +
  • Select a \b Shape to which the annotation will be assigned.
  • +
  • Set Fixed screen position to select alogithm for the annotation position caldulation.
  • +
  • Select a Shape Type to which the annotation will be assigned on the shape. + It contains "Whole shape", "Vertex", "Edge", "Face" and "Solid" choices.
  • +
  • Select a sub shape to assign annotation to. Text control contains information about local selection in the viewer.
  • +
  • Push \b Apply or Apply and Close button to commit creation of the field.
  • +
+ +*/ diff --git a/doc/salome/gui/GEOM/input/using_measurement_tools.doc b/doc/salome/gui/GEOM/input/using_measurement_tools.doc index 515a94ce4..feca9e24f 100644 --- a/doc/salome/gui/GEOM/input/using_measurement_tools.doc +++ b/doc/salome/gui/GEOM/input/using_measurement_tools.doc @@ -17,6 +17,7 @@
  • \subpage angle_page "Angle"
  • \subpage tolerance_page "Tolerance"
  • \subpage managing_dimensions_page "Dimensions"
  • +
  • \subpage annotation_page "Annotations"
  • \subpage whatis_page "WhatIs"
  • \subpage inspect_object_operation_page "Inspect Object"
  • \subpage shape_statistics_operation_page "Shape Statistics"
  • diff --git a/src/GEOMGUI/GEOMGUI_AnnotationMgr.cxx b/src/GEOMGUI/GEOMGUI_AnnotationMgr.cxx index b7f4e9f9d..e1cecc0d1 100755 --- a/src/GEOMGUI/GEOMGUI_AnnotationMgr.cxx +++ b/src/GEOMGUI/GEOMGUI_AnnotationMgr.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -144,7 +145,8 @@ bool GEOMGUI_AnnotationMgr::IsDisplayed( const QString& theEntry, const int theI // purpose : Displays annotation shape presentation in view. It creates an annotation presentation // and stores it in an internal container //======================================================================= -void GEOMGUI_AnnotationMgr::Display( const QString& theEntry, const int theIndex, SOCC_Viewer* theView ) +void GEOMGUI_AnnotationMgr::Display( const QString& theEntry, const int theIndex, SOCC_Viewer* theView, + const bool isStoreViewState, const bool isUpdateViewer ) { SOCC_Viewer* aView = viewOrActiveView( theView ); if ( !aView ) @@ -161,7 +163,8 @@ void GEOMGUI_AnnotationMgr::Display( const QString& theEntry, const int theIndex QString anEntry = QString("%1%2%3").arg(theEntry).arg(GetEntrySeparator()).arg(theIndex); SALOME_Prs* aPrs = CreatePresentation( aProperty, anObject, aView, anEntry ); ((SALOME_View*)aView)->Display( getDisplayer(), aPrs ); - getDisplayer()->UpdateViewer(); + if ( isUpdateViewer ) + getDisplayer()->UpdateViewer(); EntryToAnnotations anEntryToMap; if ( myVisualized.contains( aView ) ) @@ -175,9 +178,11 @@ void GEOMGUI_AnnotationMgr::Display( const QString& theEntry, const int theIndex anEntryToMap[theEntry] = anAnnotationToPrsMap; myVisualized[aView] = anEntryToMap; - // change persistent for the entry: set visible state in true for indices which presentations are shown - storeVisibleState( theEntry, theView ); - storeFixedPosition( theEntry, theView ); + if ( isStoreViewState ) { + // change persistent for the entry: set visible state in true for indices which presentations are shown + storeVisibleState( theEntry, theView ); + storeFixedPosition( theEntry, theView ); + } } void GEOMGUI_AnnotationMgr::Redisplay( const QString& theEntry, const int theIndex, @@ -251,7 +256,8 @@ void GEOMGUI_AnnotationMgr::Redisplay( const QString& theEntry, const int theInd } } -void GEOMGUI_AnnotationMgr::Erase( const QString& theEntry, const int theIndex, SOCC_Viewer* theView ) +void GEOMGUI_AnnotationMgr::Erase( const QString& theEntry, const int theIndex, SOCC_Viewer* theView, + const bool isUpdateViewer ) { SOCC_Viewer* aView = viewOrActiveView( theView ); if ( !aView ) @@ -271,7 +277,8 @@ void GEOMGUI_AnnotationMgr::Erase( const QString& theEntry, const int theIndex, // erase presentation from the viewer SALOME_Prs* aPrs = anAnnotationToPrs[theIndex]; ((SALOME_View*)aView)->Erase( getDisplayer(), aPrs ); - getDisplayer()->UpdateViewer(); + if ( isUpdateViewer ) + getDisplayer()->UpdateViewer(); // remove displayed parameters from an internal container anAnnotationToPrs.remove( theIndex ); @@ -288,7 +295,8 @@ void GEOMGUI_AnnotationMgr::Erase( const QString& theEntry, const int theIndex, storeVisibleState( theEntry, theView ); } -void GEOMGUI_AnnotationMgr::DisplayVisibleAnnotations( const QString& theEntry, SOCC_Viewer* theView ) +void GEOMGUI_AnnotationMgr::DisplayVisibleAnnotations( const QString& theEntry, SOCC_Viewer* theView, + const bool isUpdateViewer ) { SalomeApp_Study* aStudy = dynamic_cast( getApplication()->activeStudy() ); _PTR(SObject) aSObj = aStudy->studyDS()->FindObjectID( theEntry.toStdString() ); @@ -303,12 +311,13 @@ void GEOMGUI_AnnotationMgr::DisplayVisibleAnnotations( const QString& theEntry, for ( int anIndex = 0; anIndex < aCount; ++anIndex ) { if ( isVisible[anIndex] ) - Display( theEntry, anIndex, theView ); + Display( theEntry, anIndex, theView, true, isUpdateViewer ); } } } -void GEOMGUI_AnnotationMgr::EraseVisibleAnnotations( const QString& theEntry, SOCC_Viewer* theView ) +void GEOMGUI_AnnotationMgr::EraseVisibleAnnotations( const QString& theEntry, SOCC_Viewer* theView, + const bool isUpdateViewer ) { SOCC_Viewer* aView = viewOrActiveView( theView ); if ( !myVisualized.contains( aView ) ) @@ -333,7 +342,8 @@ void GEOMGUI_AnnotationMgr::EraseVisibleAnnotations( const QString& theEntry, SO SALOME_Prs* aPrs = anAnnotationToPrs[anIndex]; ((SALOME_View*)aView)->Erase( getDisplayer(), aPrs ); } - getDisplayer()->UpdateViewer(); + if ( isUpdateViewer ) + getDisplayer()->UpdateViewer(); anEntryToAnnotation.remove( theEntry ); myVisualized[aView] = anEntryToAnnotation; } @@ -436,6 +446,57 @@ void GEOMGUI_AnnotationMgr::UpdateVisibleAnnotations( const QString& theEntry, S getDisplayer()->UpdateViewer(); } +void GEOMGUI_AnnotationMgr::DisplayAllAnnotations( SOCC_Viewer* theView ) +{ + SOCC_Viewer* aView = viewOrActiveView( theView ); + if ( !myVisualized.contains( aView ) ) + return; + + GeometryGUI* aModule = dynamic_cast( getApplication()->activeModule() ); + GEOMGUI_TextTreeWdg* aTextWidget = aModule->GetTextTreeWdg(); + QList anEntries = aTextWidget->getAllEntries( GEOMGUI_TextTreeWdg::AnnotationShape ); + + SalomeApp_Study* aStudy = dynamic_cast( getApplication()->activeStudy() ); + for ( int i = 0, aCount = anEntries.size(); i < aCount; i++ ) { + QString anEntry = anEntries[i]; + + _PTR(SObject) aSObj = aStudy->studyDS()->FindObjectID( anEntry.toStdString() ); + if ( !aSObj ) + continue; + + const Handle(GEOMGUI_AnnotationAttrs) aShapeAnnotations = GEOMGUI_AnnotationAttrs::FindAttributes( aSObj ); + if ( !aShapeAnnotations.IsNull() ) + continue; + + int anAnnotationsCount = aShapeAnnotations->GetNbAnnotation(); + for ( int anIndex = 0; anIndex < anAnnotationsCount; ++anIndex ) + { + Display( anEntry, anIndex, aView, false, false ); + } + getDisplayer()->UpdateViewer(); + storeVisibleState( anEntry, aView ); + storeFixedPosition( anEntry, aView ); + } +} + +void GEOMGUI_AnnotationMgr::EraseAllAnnotations( SOCC_Viewer* theView ) +{ + SOCC_Viewer* aView = viewOrActiveView( theView ); + if ( !myVisualized.contains( aView ) ) + return; + + GeometryGUI* aModule = dynamic_cast( getApplication()->activeModule() ); + GEOMGUI_TextTreeWdg* aTextWidget = aModule->GetTextTreeWdg(); + QList anEntries = aTextWidget->getAllEntries( GEOMGUI_TextTreeWdg::AnnotationShape ); + + for ( int i = 0, aCount = anEntries.size(); i < aCount; i++ ) { + QString anEntry = anEntries[i]; + EraseVisibleAnnotations( anEntry, aView, false ); + storeVisibleState( anEntry, aView ); + } + getDisplayer()->UpdateViewer(); +} + void GEOMGUI_AnnotationMgr::SetPreviewStyle( const QString& theEntry, const int theIndex, const bool theIsPreview ) { SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr(); diff --git a/src/GEOMGUI/GEOMGUI_AnnotationMgr.h b/src/GEOMGUI/GEOMGUI_AnnotationMgr.h index 56a46acec..52d3b1260 100755 --- a/src/GEOMGUI/GEOMGUI_AnnotationMgr.h +++ b/src/GEOMGUI/GEOMGUI_AnnotationMgr.h @@ -59,17 +59,25 @@ public: const QString& theEntry = QString() ); bool IsDisplayed( const QString& theEntry, const int theIndex, SOCC_Viewer* theView = 0 ) const; - void Display( const QString& theEntry, const int theIndex, SOCC_Viewer* theView = 0 ); - void Erase( const QString& theEntry, const int theIndex, SOCC_Viewer* theView = 0 ); + void Display( const QString& theEntry, const int theIndex, SOCC_Viewer* theView = 0, + const bool isStoreViewState = true, const bool isUpdateViewer = true ); + void Erase( const QString& theEntry, const int theIndex, SOCC_Viewer* theView = 0, + const bool isUpdateViewer = true ); void EraseRemovedAnnotation( const QString& theEntry, const int theIndex ); void Redisplay( const QString& theEntry, const int theIndex, const GEOMGUI_AnnotationAttrs::Properties& theProperties); void Redisplay( const QString& theEntry, const int theIndex, const GEOMGUI_AnnotationAttrs::Properties& theProperties, SOCC_Viewer* theView ); - void DisplayVisibleAnnotations( const QString& theEntry, SOCC_Viewer* theView = 0 ); - void EraseVisibleAnnotations( const QString& theEntry, SOCC_Viewer* theView = 0 ); + void DisplayVisibleAnnotations( const QString& theEntry, SOCC_Viewer* theView = 0, + const bool isUpdateViewer = true ); + void EraseVisibleAnnotations( const QString& theEntry, SOCC_Viewer* theView = 0, + const bool isUpdateViewer = true ); void UpdateVisibleAnnotations( const QString& theEntry, SOCC_Viewer* theView = 0 ); + + void DisplayAllAnnotations( SOCC_Viewer* theView = 0 ); + void EraseAllAnnotations( SOCC_Viewer* theView = 0 ); + void SetPreviewStyle( const QString& theEntry, const int theIndex, const bool theIsPreview ); void RemoveView( SOCC_Viewer* theView ); diff --git a/src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx b/src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx index 47dd3441e..b245a14f9 100755 --- a/src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx +++ b/src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx @@ -521,13 +521,14 @@ void GEOMGUI_TextTreeWdg::updateVisibilityColumn( const BranchType& theBranchTyp //================================================================================= void GEOMGUI_TextTreeWdg::showContextMenu( const QPoint& pos ) { - if ( selectedItems().isEmpty() ) - return; + CAM_Application* anApp = dynamic_cast(myStudy->application()); + GeometryGUI* aModule = dynamic_cast(anApp->activeModule()); + QMenu aMenu; - aMenu.addAction( myActions[GEOMOp::OpShow] ); - aMenu.addAction( myActions[GEOMOp::OpHide] ); + aMenu.addAction( aModule->action(GEOMOp::OpShowAllAnnotations) ); + aMenu.addAction( aModule->action(GEOMOp::OpHideAllAnnotations) ); - if ( selectedItems().count() == 1 ) { + if ( !selectedItems().isEmpty() && selectedItems().count() == 1 ) { QTreeWidgetItem* anItem = selectedItems().first(); QString anEntry = entryFromItem( anItem->parent() ); if ( !anEntry.isEmpty() ) { @@ -539,8 +540,6 @@ void GEOMGUI_TextTreeWdg::showContextMenu( const QPoint& pos ) return; aMenu.clear(); // Edit annotation action - CAM_Application* anApp = dynamic_cast(myStudy->application()); - GeometryGUI* aModule = dynamic_cast(anApp->activeModule()); QAction* anEditAction = aModule->action(GEOMOp::OpEditAnnotation); if ( anEditAction ) aMenu.addAction( anEditAction ); @@ -730,6 +729,15 @@ void GEOMGUI_TextTreeWdg::setSelected( const QMap >& theAnno } } +//================================================================================= +// function : getAllEntries +// purpose : +//================================================================================= +QList GEOMGUI_TextTreeWdg::getAllEntries( const BranchType& theBranchType ) +{ + return getObjects( theBranchType ).keys(); +} + //================================================================================= // function : setShapeItemVisibility // purpose : diff --git a/src/GEOMGUI/GEOMGUI_TextTreeWdg.h b/src/GEOMGUI/GEOMGUI_TextTreeWdg.h index 2025a511e..d92a607b8 100644 --- a/src/GEOMGUI/GEOMGUI_TextTreeWdg.h +++ b/src/GEOMGUI/GEOMGUI_TextTreeWdg.h @@ -73,6 +73,8 @@ public: void getSelected( QMap >& theAnnotations ); void setSelected( const QMap >& theAnnotations ); + QList getAllEntries( const BranchType& theBranchType ); + protected: void createActions(); void redisplay( QString theEntry ); diff --git a/src/MeasureGUI/MeasureGUI.cxx b/src/MeasureGUI/MeasureGUI.cxx index ea9758c95..084a9b61a 100755 --- a/src/MeasureGUI/MeasureGUI.cxx +++ b/src/MeasureGUI/MeasureGUI.cxx @@ -231,38 +231,44 @@ void MeasureGUI::ChangeAnnotationsVisibility( const bool theIsVisible ) return; Handle(SALOME_InteractiveObject) anIObject = getSingleSelectedIO(); - if ( anIObject.IsNull() - || !anIObject->hasEntry() ) - return; - - const QString aEntry = anIObject->getEntry(); + if ( !anIObject.IsNull() && anIObject->hasEntry() ) { + const QString aEntry = anIObject->getEntry(); - _PTR(SObject) aSObj = anActiveStudy->studyDS()->FindObjectID( aEntry.toStdString() ); + _PTR(SObject) aSObj = anActiveStudy->studyDS()->FindObjectID( aEntry.toStdString() ); - const Handle(GEOMGUI_AnnotationAttrs) - aShapeAnnotations = GEOMGUI_AnnotationAttrs::FindAttributes( aSObj ); + const Handle(GEOMGUI_AnnotationAttrs) + aShapeAnnotations = GEOMGUI_AnnotationAttrs::FindAttributes( aSObj ); - if ( aShapeAnnotations.IsNull() ) { - return; - } + if ( aShapeAnnotations.IsNull() ) { + return; + } - const int aCount = aShapeAnnotations->GetNbAnnotation(); + const int aCount = aShapeAnnotations->GetNbAnnotation(); - if ( aCount > 0 ) { + if ( aCount > 0 ) { - SUIT_OverrideCursor wc; + SUIT_OverrideCursor wc; - for ( int anI = 0; anI < aCount; ++anI ) { + for ( int anI = 0; anI < aCount; ++anI ) { - if ( !theIsVisible ) { - getGeometryGUI()->GetAnnotationMgr()->Erase( aEntry, anI ); + if ( !theIsVisible ) { + getGeometryGUI()->GetAnnotationMgr()->Erase( aEntry, anI ); + } + else { + getGeometryGUI()->GetAnnotationMgr()->Display( aEntry , anI ); + } } - else { - getGeometryGUI()->GetAnnotationMgr()->Display( aEntry , anI ); - } - } - getGeometryGUI()->emitAnnotationsUpdated( aEntry ); + getGeometryGUI()->emitAnnotationsUpdated( aEntry ); + } + } + else { + if ( theIsVisible ) { + getGeometryGUI()->GetAnnotationMgr()->DisplayAllAnnotations(); + } + else { + getGeometryGUI()->GetAnnotationMgr()->EraseAllAnnotations(); + } } } -- 2.39.2