From 32e205a228d74cdc2627143cb32360e9a557d7dc Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 2 Dec 2014 19:45:57 +0300 Subject: [PATCH] This is an improvement to use one AND filter in the viewer context. It serves to combine the document and the plane filters inside. The performance correction. The previous filters should be removed from the global context otherwise a list of filters is quickly extended. Test case is a lines creation by clicks in the viewer. --- src/XGUI/XGUI_Displayer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index 8347d607a..adfe3aad8 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -332,6 +332,9 @@ void XGUI_Displayer::openLocalContext() // a list of filters in the global context is not cleared and should be cleared here SelectMgr_ListOfFilter aFilters; aFilters.Assign(aContext->Filters()); + // it is important to remove the filters in the global context, because there is a code + // in the closeLocalContex, which restore the global context filters + aContext->RemoveFilters(); //aContext->ClearCurrents(); aContext->OpenLocalContext(); -- 2.39.2