Centralize retained document session dialog closing
This commit is contained in:
@@ -534,6 +534,10 @@ agent or engineer to remove them without reconstructing context from chat.
|
||||
- 2026-06-12: DEBT-0063/DEBT-0058 were narrowed again. Open/Browse
|
||||
delete-confirmation message boxes and shared destroy-on-click bindings now
|
||||
use the retained dialog close helper in `src/legacy_ui_overlay_services.*`.
|
||||
- 2026-06-12: DEBT-0063/DEBT-0040/DEBT-0041/DEBT-0042 were narrowed again.
|
||||
Document-session overwrite prompts, unsaved-close prompts, save-before-workflow
|
||||
prompts, and accepted new/save document cleanup now route retained dialog
|
||||
closing through `src/legacy_ui_overlay_services.*`.
|
||||
- 2026-06-05: DEBT-0011 was narrowed. The Windows app package smoke target now
|
||||
passes the configure-time CMake executable into `package-smoke.ps1`, so VS
|
||||
2026 generator validation does not depend on an older `cmake` on PATH, and
|
||||
|
||||
@@ -508,6 +508,9 @@ Browse accept, resize accept/failure, and what's-new read-later/close callbacks
|
||||
now use a named retained dialog close helper instead of direct `destroy()` calls.
|
||||
Open/Browse delete-confirmation message boxes and shared destroy-on-click
|
||||
bindings now use that same retained dialog close helper.
|
||||
Document-session overwrite, unsaved-close, save-before-workflow, and accepted
|
||||
new/save document cleanup now route retained dialog closing through the same
|
||||
helpers.
|
||||
Raw popup callback captures and full close/capture ownership remain part of
|
||||
`DEBT-0063`.
|
||||
`pano_cli inspect-image` exposes PNG IHDR metadata as JSON,
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "legacy_document_canvas_services.h"
|
||||
#include "legacy_canvas_view_services.h"
|
||||
#include "legacy_history_services.h"
|
||||
#include "legacy_ui_overlay_services.h"
|
||||
#include "node_dialog_open.h"
|
||||
|
||||
#include <utility>
|
||||
@@ -117,8 +118,7 @@ void create_legacy_new_document(
|
||||
app.canvas->m_canvas->m_newdoc = false;
|
||||
app.title_update();
|
||||
|
||||
dialog->destroy();
|
||||
App::I->hideKeyboard();
|
||||
pp::panopainter::close_legacy_dialog_and_hide_keyboard(app, *dialog);
|
||||
}
|
||||
|
||||
class LegacyNewDocumentServices final : public pp::app::NewDocumentServices {
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
auto dialog = dialog_;
|
||||
msgbox->btn_ok->on_click = [app, msgbox, dialog, plan](Node*) {
|
||||
create_legacy_new_document(*app, plan, dialog);
|
||||
msgbox->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*msgbox);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -163,8 +163,7 @@ void save_legacy_document_file(
|
||||
app.doc_path = plan.target.path;
|
||||
app.doc_dir = plan.target.directory;
|
||||
app.title_update();
|
||||
dialog->destroy();
|
||||
App::I->hideKeyboard();
|
||||
pp::panopainter::close_legacy_dialog_and_hide_keyboard(app, *dialog);
|
||||
}
|
||||
|
||||
class LegacyDocumentFileSaveServices final : public pp::app::DocumentFileSaveServices {
|
||||
@@ -191,7 +190,7 @@ public:
|
||||
auto dialog = dialog_;
|
||||
msgbox->btn_ok->on_click = [app, msgbox, dialog, plan](Node*) {
|
||||
save_legacy_document_file(*app, plan, dialog);
|
||||
msgbox->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*msgbox);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -245,7 +244,7 @@ public:
|
||||
Canvas::I->m_unsaved = false;
|
||||
};
|
||||
m->btn_cancel->on_click = [dialog_already_opened, m](Node*) {
|
||||
m->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*m);
|
||||
*dialog_already_opened = false;
|
||||
};
|
||||
dialog_already_opened_ = true;
|
||||
@@ -313,11 +312,11 @@ public:
|
||||
app->message_box(plan.title, plan.message, plan.show_cancel);
|
||||
}
|
||||
});
|
||||
m->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*m);
|
||||
};
|
||||
m->btn_cancel->on_click = [m, action](Node*) {
|
||||
action();
|
||||
m->destroy();
|
||||
pp::panopainter::close_legacy_dialog_node(*m);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user