#include <ModuleBase_ISelection.h>
#include <ModuleBase_Operation.h>
#include <ModuleBase_WidgetValidated.h>
+#include <ModuleBase_WidgetValidator.h>
#include <ModuleBase_ViewerPrs.h>
IMPLEMENT_STANDARD_HANDLE(ModuleBase_FilterValidated, SelectMgr_Filter);
(aCurrentWidget);
ModuleBase_ViewerPrsPtr aPrs(new ModuleBase_ViewerPrs());
myWorkshop->selection()->fillPresentation(aPrs, theOwner);
-
- aValid = !aWidgetValidated || aWidgetValidated->isValidSelection(aPrs);
+ if (aWidgetValidated)
+ aValid = !aWidgetValidated || aWidgetValidated->isValidSelection(aPrs);
+ else if (aCurrentWidget->widgetValidator()) {
+ ModuleBase_WidgetValidator* aWidgetValidator = aCurrentWidget->widgetValidator();
+ aValid = aWidgetValidator->isValidSelection(aPrs);
+ }
}
#ifdef DEBUG_FILTERS