From cb8e410e423a4b5ba20a3c00c8afa90b4a713168 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 7 Dec 2017 13:18:52 +0300 Subject: [PATCH] Issue #2349 Fatal error when close window Hide faces --- src/XGUI/XGUI_FacesPanel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/XGUI/XGUI_FacesPanel.cpp b/src/XGUI/XGUI_FacesPanel.cpp index 565f611f5..0c9124ff9 100644 --- a/src/XGUI/XGUI_FacesPanel.cpp +++ b/src/XGUI/XGUI_FacesPanel.cpp @@ -74,13 +74,17 @@ XGUI_FacesPanel::XGUI_FacesPanel(QWidget* theParent, ModuleBase_IWorkshop* theWo //******************************************************************** void XGUI_FacesPanel::reset(const bool isToFlushRedisplay) { + if (myLastItemIndex == 0) // do nothing because there was no activity in the pane after reset + return; + // clear internal containers myListView->getControl()->clear(); myItems.clear(); // restore previous view of presentations bool isModified = redisplayObjects(myItemObjects, false); - isModified = displayHiddenObjects(myHiddenObjects, false) || isModified; + std::set > aHiddenObjects = myHiddenObjects; + isModified = displayHiddenObjects(aHiddenObjects, false) || isModified; if (isModified && isToFlushRedisplay) Events_Loop::loop()->flush(Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY)); -- 2.39.2