#include <ModuleBase_ViewerPrs.h>
#include <ModuleBase_Tools.h>
+#include <AIS_ViewCube.hxx>
+
IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_FilterValidated, SelectMgr_Filter);
Standard_Boolean ModuleBase_FilterValidated::
return false;
ModuleBase_WidgetValidated* aWidgetValidated = dynamic_cast<ModuleBase_WidgetValidated*>
(aCurrentWidget);
- if (aWidgetValidated)
+ if (aWidgetValidated) {
aValid = !aWidgetValidated || aWidgetValidated->isValidSelection(aPrs);
+ if (!aValid && theOwner->HasSelectable()) {
+ // Validate the current widget filters, if the user has picked the navigation cube.
+ // We want to allow the usage of it during feature creation/edition.
+ Handle(SelectMgr_SelectableObject) aSelObj = theOwner->Selectable();
+ Handle(Standard_Type) aType = aSelObj->DynamicType();
+ if (aType == STANDARD_TYPE(AIS_ViewCube))
+ aValid = true;
+ }
+ }
else{
ModuleBase_WidgetValidator* aWidgetValidator = aCurrentWidget->widgetValidator();
if (aWidgetValidator)