Salome HOME
Issue #324: Reset items of loaded parts
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 29 Dec 2014 12:16:21 +0000 (15:16 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 29 Dec 2014 12:16:21 +0000 (15:16 +0300)
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/XGUI/XGUI_DocumentDataModel.cpp

index eeb38baaab46c3e49126cefcc72a37e82af383ec..9fff4686996f5bad134648b16a32382df9218baf 100644 (file)
@@ -36,6 +36,7 @@
 
 #include <QLabel>
 #include <QTimer>
+#include <QApplication>
 
 #define PLANE_SIZE          "200"     
 #define SKETCH_WIDTH        "4"
@@ -117,6 +118,7 @@ void PartSet_WidgetSketchLabel::onPlaneSelected()
         // Update sketcher actions
         XGUI_ActionsMgr* anActMgr = myWorkshop->actionsMgr();
         anActMgr->update();
+        myWorkshop->viewer()->update();
       }
     }
   }
index c6e5e523e84c87b25bf49450ae2382c3018b3afc..24434261b1edb08f326893b2e4bbb1f439b0b28e 100644 (file)
@@ -94,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 ***********************