Salome HOME
add 'undo' shorcut on Hide Faces panel selection. WARNING The delete feature is stran...
[modules/shaper.git] / src / XGUI / XGUI_Selection.cpp
index 800140a528f9834f3499f05e542dc7c5fdc8737a..7330215307a5f30cddac585944ab194521432269 100644 (file)
@@ -297,12 +297,12 @@ void XGUI_Selection::fillPresentation(ModuleBase_ViewerPrsPtr& thePrs,
     Handle(AIS_TrihedronOwner) aTrihedronOwner = Handle(AIS_TrihedronOwner)::DownCast(theOwner);
     if (!aTrihedronOwner.IsNull()) {
       const Prs3d_DatumParts& aPart = aTrihedronOwner->DatumPart();
-      std::string aName;
+      std::wstring aName;
       switch (aPart) {
-        case Prs3d_DP_Origin: aName = "Origin"; break;
-        case Prs3d_DP_XAxis: aName = "OX"; break;
-        case Prs3d_DP_YAxis: aName = "OY"; break;
-        case Prs3d_DP_ZAxis: aName = "OZ"; break;
+        case Prs3d_DP_Origin: aName = L"Origin"; break;
+        case Prs3d_DP_XAxis: aName = L"OX"; break;
+        case Prs3d_DP_YAxis: aName = L"OY"; break;
+        case Prs3d_DP_ZAxis: aName = L"OZ"; break;
         default: break;
       }
       if (aName.length() > 0) {
@@ -358,7 +358,6 @@ QList<ModuleBase_ViewerPrsPtr> XGUI_Selection::getHighlighted() const
     return aPresentations;
 
   QList<size_t> aSelectedIds; // Remember of selected address in order to avoid duplicates
-  XGUI_Displayer* aDisplayer = myWorkshop->displayer();
   for (aContext->InitDetected(); aContext->MoreDetected(); aContext->NextDetected()) {
     Handle(SelectMgr_EntityOwner) anOwner = aContext->DetectedOwner();
     if (!anOwner.IsNull()) {
@@ -447,14 +446,12 @@ void XGUI_Selection::entityOwners(const Handle(AIS_InteractiveObject)& theObject
 
     Handle(SelectMgr_Selection) aSelection = theObject->Selection(aMode);
     NCollection_Vector<Handle(SelectMgr_SensitiveEntity)> anEntities = aSelection->Entities();
-    for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator anIt(anEntities);
-        anIt.More();
-        anIt.Next()) {
-      Handle(SelectMgr_SensitiveEntity) anEntity = anIt.Value();
+    for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator anEntIt(anEntities);
+         anEntIt.More(); anEntIt.Next()) {
+      Handle(SelectMgr_SensitiveEntity) anEntity = anEntIt.Value();
       if (anEntity.IsNull())
         continue;
-       Handle(SelectMgr_EntityOwner) anOwner =
-        Handle(SelectMgr_EntityOwner)::DownCast(anEntity->BaseSensitive()->OwnerId());
+      Handle(SelectMgr_EntityOwner) anOwner = anEntity->BaseSensitive()->OwnerId();
       if (!anOwner.IsNull())
         theOwners.Add(anOwner);
     }