Salome HOME
Unicode support: correct handling of unicode on GUI level
[modules/gui.git] / src / LightApp / LightApp_VTKSelector.cxx
index 79f9e735ae300d52451a26a03bf7fb9949153623..70db9624fa29aab715200b7910c4fbb30dfb4e8d 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
 
 #ifndef DISABLE_SALOMEOBJECT
   #include "SALOME_Actor.h"
-  #include "SALOME_ListIteratorOfListIO.hxx"
+  #include "SALOME_ListIO.hxx"
 #endif
 
-
+#include <utilities.h>
 
 #ifndef DISABLE_VTKVIEWER
 #ifndef DISABLE_SALOMEOBJECT
@@ -103,7 +103,7 @@ LightApp_SVTKDataOwner
     }
   }
   
-  return -1;
+  return ActorSelection; // workaround for embedded VTK viewer in a module : is it safe ?
 }
 
 /*!
@@ -228,6 +228,7 @@ LightApp_VTKSelector
           for(; anIter != theList.end(); ++anIter){
             const SUIT_DataOwner* aDataOwner = (*anIter).get();
             if(const LightApp_SVTKDataOwner* anOwner = dynamic_cast<const LightApp_SVTKDataOwner*>(aDataOwner)){
+              MESSAGE("aSelector->SetSelectionMode("<<anOwner->GetMode()<<");");
               aSelector->SetSelectionMode(anOwner->GetMode());
               Handle(SALOME_InteractiveObject) anIO = anOwner->IO();
 
@@ -237,7 +238,7 @@ LightApp_VTKSelector
               aSelector->AddOrRemoveIndex(anIO,anOwner->GetIds(),false);
             }else if(const LightApp_DataOwner* anOwner = dynamic_cast<const LightApp_DataOwner*>(aDataOwner)){
               Handle(SALOME_InteractiveObject) anIO = 
-                new SALOME_InteractiveObject(anOwner->entry().toLatin1(),"");
+                new SALOME_InteractiveObject(anOwner->entry().toUtf8(),"");
               aSelector->AddIObject(anIO);
               anAppendList.Append(anIO);
             }