From 4d2337ff94a9db7aa38997a369c1cca470a3297c Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 6 Jun 2016 09:27:41 +0300 Subject: [PATCH] Correction for selector(greed) widgets. Using preselection. --- src/ModuleBase/ModuleBase_OperationFeature.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ModuleBase/ModuleBase_OperationFeature.cpp b/src/ModuleBase/ModuleBase_OperationFeature.cpp index 79d72de89..82cf7906b 100755 --- a/src/ModuleBase/ModuleBase_OperationFeature.cpp +++ b/src/ModuleBase/ModuleBase_OperationFeature.cpp @@ -383,10 +383,14 @@ ModuleBase_ModelWidget* ModuleBase_OperationFeature::activateByPreselection( aWgt = (*aWIt); if (aWgt->attributeID() == theGreedAttributeId) { aPropertyPanel->setPreselectionWidget(aWgt); - aWgt->setSelection(myPreSelection, true); - aPropertyPanel->setPreselectionWidget(NULL); - aFilledWgt = aWgt; - break; + if (aWgt->setSelection(myPreSelection, true)) { + aPropertyPanel->setPreselectionWidget(NULL); + aFilledWgt = aWgt; + break; + } + else { // do not process invalid for greed widget selection + break; + } } } } -- 2.39.2