Salome HOME
Unicode support: correct handling of unicode on GUI level
[modules/gui.git] / src / LightApp / LightApp_Displayer.cxx
index cde6ceadf9a2e25c4f0ccc312e17d371905211d1..fd9d54ea61d436d394e60ed141b98a5cb9acb9d3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -88,7 +88,7 @@ void LightApp_Displayer::Display( const QStringList& list, const bool updateView
       {
        myLastEntry = *it;
         vf->BeforeDisplay( this, prs );
-        vf->Display( prs );
+        vf->Display( this, prs );
         vf->AfterDisplay( this, prs );
 
         if ( updateViewer )
@@ -97,7 +97,6 @@ void LightApp_Displayer::Display( const QStringList& list, const bool updateView
       delete prs;  // delete presentation because displayer is its owner
       setVisibilityState(*it, Qtx::ShownState);
     }
-
   }
 }
 
@@ -170,11 +169,11 @@ void LightApp_Displayer::Erase( const QStringList& list, const bool forced,
   QStringList::const_iterator it = list.constBegin();
   for ( ; it != list.constEnd(); ++it)
   {
-    SALOME_Prs* prs = vf->CreatePrs( (*it).toLatin1().data() );
+    SALOME_Prs* prs = vf->CreatePrs( (*it).toUtf8().data() );
     if ( prs ) {
       myLastEntry = *it;
       vf->BeforeErase( this, prs );
-      vf->Erase( prs, forced );
+      vf->Erase( this, prs, forced );
       vf->AfterErase( this, prs );
       if ( updateViewer )
         vf->Repaint();
@@ -190,12 +189,12 @@ void LightApp_Displayer::Erase( const QStringList& list, const bool forced,
   \param updateViewer - is it necessary to update viewer
   \param theViewFrame - view
 */
-void LightApp_Displayer::EraseAll( const bool forced, const bool updateViewer, SALOME_View* theViewFrame ) const
+void LightApp_Displayer::EraseAll( const bool forced, const bool updateViewer, SALOME_View* theViewFrame )
 {
   SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView();
 
   if ( vf ) {
-    vf->EraseAll( forced );
+    vf->EraseAll( this, forced );
     if ( updateViewer )
       vf->Repaint();
   }
@@ -219,7 +218,7 @@ bool LightApp_Displayer::IsDisplayed( const QString& entry, SALOME_View* theView
   {
 #ifndef DISABLE_SALOMEOBJECT
     Handle( SALOME_InteractiveObject ) temp = new SALOME_InteractiveObject();
-    temp->setEntry( entry.toLatin1() );
+    temp->setEntry( entry.toUtf8() );
     res = vf->isVisible( temp );
 #endif
   }
@@ -249,7 +248,7 @@ SALOME_Prs* LightApp_Displayer::buildPresentation( const QString& entry, SALOME_
   SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView();
 
   if ( vf )
-    prs = vf->CreatePrs( entry.toLatin1() );
+    prs = vf->CreatePrs( entry.toUtf8() );
 
   return prs;
 }