JsonWizard: Check widget visibility when determining if it's mandatory

The wizard is unable to advance when a mandatory field is hidden. Assume
a hidden widget is not mandatory.

Change-Id: I19bdc1a661d91b75151d3aec34ad9d584002a556
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Victor Heng
2016-05-28 16:56:28 -07:00
committed by Victor Heng
parent 4117ba7313
commit 48423414f6

View File

@@ -955,7 +955,7 @@ bool JsonFieldPage::isComplete() const
showError(message);
hasErrorMessage = true;
}
if (f->isMandatory())
if (f->isMandatory() && !f->widget()->isHidden())
result = false;
}
}