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