-// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011 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
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : GEOMGUI_OCCSelector.cxx
if (!entryStr.isEmpty())
{
+ Handle(SALOME_InteractiveObject) anIO = Handle(SALOME_InteractiveObject)::DownCast(io->GetOwner());
LightApp_DataOwner* owner;
if (index > -1) // Local Selection
owner = new LightApp_DataSubOwner (entryStr, index);
- else // Global Selection
- owner = new LightApp_DataOwner (entryStr);
+ else if ( !anIO.IsNull() ) // Global Selection
+ owner = new LightApp_DataOwner( anIO );
aList.append(SUIT_DataOwnerPtr(owner));
}
if ( !entryStr.isEmpty() )
{
- LightApp_DataOwner* owner = new LightApp_DataOwner( entryStr );
- aList.append( SUIT_DataOwnerPtr( owner ) );
+ Handle(SALOME_InteractiveObject) anIO = Handle(SALOME_InteractiveObject)::DownCast(io->GetOwner());
+ if ( !anIO.IsNull() ) {
+ LightApp_DataOwner* owner = new LightApp_DataOwner( anIO );
+ aList.append( SUIT_DataOwnerPtr( owner ) );
+ }
}
}
}
Handle(AIS_InteractiveContext) ic = vw->getAISContext();
// "entry - list_of_int" map for LOCAL selection
-#ifndef WNT
NCollection_DataMap<TCollection_AsciiString, TColStd_IndexedMapOfInteger> indexesMap;
-#else
- NCollection_DataMap<Standard_CString, TColStd_IndexedMapOfInteger> indexesMap;
-#endif
QMap<QString,int> globalSelMap; // only Key=entry from this map is used. value(int) is NOT used at all.
SelectMgr_IndexedMapOfOwner ownersmap; // map of owners to be selected
if ( subOwner )
{
QString entry = subOwner->entry();
-#ifndef WNT
if ( indexesMap.IsBound( TCollection_AsciiString(entry.toLatin1().data())))
-#else
- if ( indexesMap.IsBound( entry.toLatin1().data() ) )
-#endif
{
TColStd_IndexedMapOfInteger& subIndexes = indexesMap.ChangeFind(entry.toLatin1().data());
subIndexes.Add( subOwner->index() );