From: vsv Date: Tue, 30 Jul 2019 09:57:32 +0000 (+0300) Subject: Issue #2948: Synchronize selection for filters controls X-Git-Tag: VEDF2019Lot4~75 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=afbbacca198d72a90472539698aa055bd58c5e56;p=modules%2Fshaper.git Issue #2948: Synchronize selection for filters controls --- diff --git a/src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp b/src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp index d7e3d15de..78b3bb708 100644 --- a/src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp @@ -630,5 +630,20 @@ void ModuleBase_WidgetSelectionFilter::onObjectUpdated() myShowBtn->setChecked(false); clearCurrentSelection(true); updateNumberSelected(); + + QList aItemsList = myFiltersWgt->findChildren(); + foreach(ModuleBase_FilterItem* aItem, aItemsList) { + QList aWidgetsList = aItem->widgets(); + foreach(ModuleBase_ModelWidget* aWidget, aWidgetsList) { + if (!aWidget->feature().get()) + aWidget->setFeature(myFeature); + aWidget->restoreValue(); + } + } updateObject(myFeature); + + // Redisplay the feature on order to Customize presentations from filters with selectors + static Events_ID EVENT_DISP = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY); + ModelAPI_EventCreator::get()->sendUpdated(myFeature, EVENT_DISP); + Events_Loop::loop()->flush(EVENT_DISP); }