Centralize retained keyboard dialog closing

This commit is contained in:
2026-06-12 15:39:52 +02:00
parent 0c41101f5f
commit 935e6972a5
5 changed files with 15 additions and 6 deletions

View File

@@ -211,8 +211,7 @@ void App::dialog_newdoc()
};
dialog->btn_cancel->on_click = [this, dialog](Node*)
{
dialog->destroy();
App::I->hideKeyboard();
pp::panopainter::close_legacy_dialog_and_hide_keyboard(*this, *dialog);
};
};
@@ -343,8 +342,7 @@ void App::dialog_save()
};
dialog->btn_cancel->on_click = [this, dialog](Node*)
{
dialog->destroy();
App::I->hideKeyboard();
pp::panopainter::close_legacy_dialog_and_hide_keyboard(*this, *dialog);
};
(void)pp::panopainter::attach_legacy_overlay_node(*this, dialog);
@@ -464,8 +462,7 @@ void App::dialog_layer_rename()
};
dialog->btn_cancel->on_click = [this, dialog](Node*)
{
dialog->destroy();
App::I->hideKeyboard();
pp::panopainter::close_legacy_dialog_and_hide_keyboard(*this, *dialog);
};
}