From: nds Date: Thu, 7 Dec 2017 10:18:52 +0000 (+0300) Subject: Issue #2349 Fatal error when close window Hide faces X-Git-Tag: V_2.10.0RC~83 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cb8e410e423a4b5ba20a3c00c8afa90b4a713168;p=modules%2Fshaper.git Issue #2349 Fatal error when close window Hide faces --- 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));