Fix Wizard accept to work with the setAccept accept funcs
This commit is contained in:
parent
38a3113ab6
commit
287168a6cc
@ -331,9 +331,9 @@ void Wizard::setAccept(std::function<int()> acceptFunc) {
|
|||||||
|
|
||||||
void Wizard::accept() {
|
void Wizard::accept() {
|
||||||
auto page = dynamic_cast<WizardFormPage*>(currentPage());
|
auto page = dynamic_cast<WizardFormPage*>(currentPage());
|
||||||
if (page == nullptr || page->accept() == 0) {
|
if (page != nullptr && page->accept() == 0) {
|
||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
} else if(m_acceptFunc != nullptr && m_acceptFunc() == 0) {
|
} else if (m_acceptFunc != nullptr && m_acceptFunc() == 0) {
|
||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user