From 3c6617edd6e7b7fe4476415ea39ed90db5f025d1 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 28 Aug 2015 18:45:40 +0300 Subject: [PATCH] The preview presentation should be updated by the operation values changed. If the operation, e.g. Group/Export has no preview for the feature, or feature is hidden, the customize does not happen, and the obsolete operation prs stayed in the viewer. --- src/PartSet/PartSet_CustomPrs.cpp | 4 +++- src/XGUI/XGUI_Displayer.cpp | 1 - src/XGUI/XGUI_WorkshopListener.cpp | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PartSet/PartSet_CustomPrs.cpp b/src/PartSet/PartSet_CustomPrs.cpp index 5cd38b33b..d3cdd5020 100755 --- a/src/PartSet/PartSet_CustomPrs.cpp +++ b/src/PartSet/PartSet_CustomPrs.cpp @@ -71,8 +71,10 @@ void PartSet_CustomPrs::displayPresentation() aWorkshop->displayer()->displayAIS(myOperationPrs, false/*load object in selection*/, true); aContext->SetZLayer(anOperationPrs, aModule->getVisualLayerId()); } - else + else { anOperationPrs->Redisplay(); + workshop()->displayer()->updateViewer(); + } } void PartSet_CustomPrs::erasePresentation() diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index ff4127e2f..ecbc29b4e 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -954,7 +954,6 @@ bool XGUI_Displayer::customizeObject(ObjectPtr theObject) } bool isCustomized = aCustomPrs.get() && aCustomPrs->customisePresentation(aResult, anAISObj, myCustomPrs); - myWorkshop->module()->customizeObject(theObject); return isCustomized; } diff --git a/src/XGUI/XGUI_WorkshopListener.cpp b/src/XGUI/XGUI_WorkshopListener.cpp index fcc927c3e..ae49a9141 100755 --- a/src/XGUI/XGUI_WorkshopListener.cpp +++ b/src/XGUI/XGUI_WorkshopListener.cpp @@ -220,9 +220,11 @@ void XGUI_WorkshopListener::onFeatureUpdatedMsg( break; } } + myWorkshop->module()->customizeObject(aCurrentFeature); } } anOperationMgr->onValidateOperation(); + //if (myObjectBrowser) // myObjectBrowser->processEvent(theMsg); } -- 2.39.2