Salome HOME
Copyright update 2021
[modules/geom.git] / src / GEOMGUI / GEOMGUI_AnnotationMgr.cxx
old mode 100755 (executable)
new mode 100644 (file)
index f46d527..e2c3cc3
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -61,7 +61,7 @@ GEOMGUI_AnnotationMgr::GEOMGUI_AnnotationMgr( SalomeApp_Application* theApplicat
 
 QString GEOMGUI_AnnotationMgr::GetEntrySeparator()
 {
-       return "_annotation:";
+        return "_annotation:";
 }
 
 //================================================================
@@ -82,7 +82,7 @@ SALOME_Prs* GEOMGUI_AnnotationMgr::CreatePresentation( const GEOMGUI_AnnotationA
   if ( !theEntry.isEmpty() ) {
     // owner should be set to provide selection mechanizm
     Handle( SALOME_InteractiveObject ) anIO = new SALOME_InteractiveObject();
-    anIO->setEntry( theEntry.toLatin1().constData() );
+    anIO->setEntry( theEntry.toUtf8().constData() );
     aPresentation->SetOwner( anIO );
   }
 
@@ -113,7 +113,7 @@ SALOME_Prs* GEOMGUI_AnnotationMgr::CreatePresentation( const GEOMGUI_AnnotationA
   setDisplayProperties( aPresentation, aView, getEntry( theObject ).c_str() );
 
   // add Prs to preview
-  SUIT_ViewWindow* vw = getApplication()->desktop()->activeWindow();
+  //SUIT_ViewWindow* vw = getApplication()->desktop()->activeWindow();
   SOCC_Prs* aPrs =
       dynamic_cast<SOCC_Prs*>( ( aView )->CreatePrs( 0 ) );
 
@@ -251,7 +251,7 @@ void GEOMGUI_AnnotationMgr::Redisplay( const QString& theEntry, const int theInd
       Handle(GEOM_Annotation) aPresentation = Handle(GEOM_Annotation)::DownCast( aPrs );
 
       GEOMGUI_AnnotationAttrs::SetupPresentation( aPresentation, theProperty, aShapeLCS );
-      aView->getAISContext()->Redisplay( aPresentation );
+      aView->getAISContext()->Redisplay( aPresentation, Standard_True );
     }
   }
 }
@@ -424,7 +424,6 @@ void GEOMGUI_AnnotationMgr::UpdateVisibleAnnotations( const QString& theEntry, S
 
       if ( !aShape.IsNull() ) {
 
-        gp_Ax3 aShapeLCS = gp_Ax3().Transformed( aShape.Location().Transformation() );
         GEOMGUI_AnnotationAttrs::SetupPresentation( aPresentation, aProperty, aShapeLCS );
         if ( aProperty.ShapeType == TopAbs_SHAPE ) {
           aPresentation->SetHilightShape( aShape );
@@ -440,7 +439,7 @@ void GEOMGUI_AnnotationMgr::UpdateVisibleAnnotations( const QString& theEntry, S
 
       setDisplayProperties( aPresentation, aView, theEntry );
 
-      aView->getAISContext()->Redisplay( aPresentation );
+      aView->getAISContext()->Redisplay( aPresentation, Standard_True );
     }
   }
   getDisplayer()->UpdateViewer();