Editor: Mark simple confirmation/accept dialogs as non-resizable
Adds set_flag(FLAG_RESIZE_DISABLED, true) to ConfirmationDialog and AcceptDialog instances which only contain plain content. Dialogs with content that could leave the borders of the dialog were kept as resizable. The flag is set explicitly at dialog creation time, instead of the previous auto-detect approach. In cases of uncertainty, the dialog was left as resizable.
This commit is contained in:
@@ -4091,6 +4091,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
||||
tab_container->connect("tab_changed", callable_mp(this, &ScriptEditor::_tab_changed));
|
||||
|
||||
erase_tab_confirm = memnew(ConfirmationDialog);
|
||||
erase_tab_confirm->set_flag(Window::FLAG_RESIZE_DISABLED, true);
|
||||
erase_tab_confirm->set_ok_button_text(TTRC("Save"));
|
||||
erase_tab_confirm->add_button(TTRC("Discard"), DisplayServer::get_singleton()->get_swap_cancel_ok(), "discard");
|
||||
erase_tab_confirm->connect(SceneStringName(confirmed), callable_mp(this, &ScriptEditor::_close_current_tab).bind(true, true));
|
||||
|
||||
Reference in New Issue
Block a user