Salome HOME
Unicode support: correct handling of unicode on GUI level
[modules/gui.git] / src / LightApp / LightApp_VTKSelector.cxx
index 4bcbead86f2dbeda336e6070f08d78265a449a43..70db9624fa29aab715200b7910c4fbb30dfb4e8d 100644 (file)
@@ -41,7 +41,7 @@
   #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);
             }