]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
There are two problems:
authornds <nds@opencascade.com>
Thu, 31 May 2012 08:34:08 +0000 (08:34 +0000)
committernds <nds@opencascade.com>
Thu, 31 May 2012 08:34:08 +0000 (08:34 +0000)
1) This is a limitation, that it is possible to select in OB only data objects with not empty names.
2) Selection manager performs an access to IO of selected LightApp_DataOwner without an existing check, so a crashed happens. There  can be reproduced by creation LightApp_DataOwner with an entry parameter, without IO set.

src/LightApp/LightApp_Application.cxx
src/LightApp/LightApp_SelectionMgr.cxx

index 8880510ceb7385349396b8f42e4c36a3dc6fb176..c9bb7b0648729acdcdb18d77e55f24c9da26e98a 100644 (file)
@@ -3703,8 +3703,7 @@ bool LightApp_Application::checkDataObject(LightApp_DataObject* theObj)
   if (theObj)
     {
       bool isSuitable = !theObj->entry().isEmpty() &&
-                        !theObj->componentDataType().isEmpty() &&
-                        !theObj->name().isEmpty();
+                        !theObj->componentDataType().isEmpty();
       return isSuitable;
     }
 
index 23e2c63528bcae74dc8deae9a40a7b0da3e3a023..5735d6c742d2e7974d0ec69f94a5b6a7b34380ae 100644 (file)
@@ -113,7 +113,7 @@ void LightApp_SelectionMgr::selectedObjects( SALOME_ListIO& theList, const QStri
        if ( !owner )
          continue;
 
-       if ( !aSet.contains( owner->entry() ) ) {
+       if ( !aSet.contains( owner->entry() ) && !owner->IO().IsNull() ) {
          selList.append( owner->IO() );
          aSet.insert( owner->entry() );
        }