forked from qt-creator/qt-creator
PE: JsonWizard: Improve handling of check boxes
Only handle active user clicks as 'modified' to be able to react on (un)setting values by expressions that depend on other fields. Improves the check box handling on the "Add C++ Class" and "Add Python Class" wizards as it re-evaluates the check box state based on an expression as long the user does not actively checks the respective check box. Change-Id: I739c02b85196555c0379272005ca3b0095f7c762 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -840,7 +840,7 @@ void CheckBoxField::setup(JsonFieldPage *page, const QString &name)
|
|||||||
return page->expander()->expand(m_uncheckedValue);
|
return page->expander()->expand(m_uncheckedValue);
|
||||||
});
|
});
|
||||||
|
|
||||||
QObject::connect(w, &QCheckBox::stateChanged, page, [this, page]() {
|
QObject::connect(w, &QCheckBox::clicked, page, [this, page]() {
|
||||||
m_isModified = true;
|
m_isModified = true;
|
||||||
setHasUserChanges();
|
setHasUserChanges();
|
||||||
emit page->completeChanged();
|
emit page->completeChanged();
|
||||||
|
Reference in New Issue
Block a user