From 7417ac17756eedf8e32aa67981a50616d9d81771 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 29 Dec 2014 15:16:21 +0300 Subject: [PATCH] Issue #324: Reset items of loaded parts --- src/PartSet/PartSet_WidgetSketchLabel.cpp | 2 ++ src/XGUI/XGUI_DocumentDataModel.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PartSet/PartSet_WidgetSketchLabel.cpp b/src/PartSet/PartSet_WidgetSketchLabel.cpp index eeb38baaa..9fff46869 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.cpp +++ b/src/PartSet/PartSet_WidgetSketchLabel.cpp @@ -36,6 +36,7 @@ #include #include +#include #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(); } } } diff --git a/src/XGUI/XGUI_DocumentDataModel.cpp b/src/XGUI/XGUI_DocumentDataModel.cpp index c6e5e523e..24434261b 100644 --- a/src/XGUI/XGUI_DocumentDataModel.cpp +++ b/src/XGUI/XGUI_DocumentDataModel.cpp @@ -94,7 +94,8 @@ void XGUI_DocumentDataModel::processEvent(const std::shared_ptr& 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 *********************** -- 2.39.2