From c0974b650d357f014822bdfab92314a07d5d102a Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 14 Apr 2016 17:08:56 +0300 Subject: [PATCH] 1. Correction for perfomance problem by Apply button state update: correction to reset of widget --- src/PartSet/PartSet_WidgetPoint2d.cpp | 1 + src/PartSet/PartSet_WidgetPoint2dDistance.cpp | 1 + src/XGUI/XGUI_Displayer.cpp | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index 29b8cf03d..6a51a04e8 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -186,6 +186,7 @@ bool PartSet_WidgetPoint2D::resetCustom() // if the restored value should be hidden, aDone = true to set // reset state for the widget in the parent aDone = restoreCurentValue(); + emit objectUpdated(); } else { bool isOk; diff --git a/src/PartSet/PartSet_WidgetPoint2dDistance.cpp b/src/PartSet/PartSet_WidgetPoint2dDistance.cpp index f3991587b..53295b3cc 100644 --- a/src/PartSet/PartSet_WidgetPoint2dDistance.cpp +++ b/src/PartSet/PartSet_WidgetPoint2dDistance.cpp @@ -58,6 +58,7 @@ bool PartSet_WidgetPoint2dDistance::resetCustom() // if the restored value should be hidden, aDone = true to set // reset state for the widget in the parent aDone = restoreCurentValue(); + emit objectUpdated(); } else aDone = ModuleBase_WidgetDoubleValue::resetCustom(); diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index e969fbf01..cba9d0676 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -440,7 +440,9 @@ bool XGUI_Displayer::isVisible(XGUI_Displayer* theDisplayer, const ObjectPtr& th } } } - else { + // it is possible that feature is presentable and has results, so we should check visibility + // of results if presentation is not shown (e.g. Sketch Circle/Arc features) + if (!aVisible) { // check if all results of the feature are visible FeaturePtr aFeature = ModelAPI_Feature::feature(theObject); std::list aResults = aFeature->results(); -- 2.39.2