Fix Wizard accept to work with the setAccept accept funcs
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user