Salome HOME
Error messages processing on librarry loading under windows platform
[modules/shaper.git] / src / XGUI / XGUI_DocumentDataModel.cpp
index 1ed348e1c3d0d3c2347661c529b9582b96de8122..24434261b1edb08f326893b2e4bbb1f439b0b28e 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
 #include "XGUI_DocumentDataModel.h"
 #include "XGUI_PartDataModel.h"
 #include "XGUI_Workshop.h"
@@ -92,7 +94,8 @@ void XGUI_DocumentDataModel::processEvent(const std::shared_ptr<Events_Message>&
           int aStart = aPartModel->rowCount(aIndex);  // check this index
           aIndex = createIndex(aIndex.row(), aIndex.column(), (void*) getModelIndex(aIndex));
           insertRow(aStart, aIndex);
-        }
+        } else
+          reset();
       }
     }
     // Deleted object event ***********************
@@ -214,7 +217,7 @@ QVariant XGUI_DocumentDataModel::data(const QModelIndex& theIndex, int theRole)
               else
               return QVariant();
               case Qt::DecorationRole:
-              return QIcon(XGUI_Workshop::featureIcon(aFeature->getKind()));
+              return XGUI_Workshop::featureIcon(aFeature);
               case Qt::ToolTipRole:
               return tr("Feature object");
               case Qt::ForegroundRole: