You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
Move "Dialog Bounds" from the Editor Settings to project's metadata
This commit is contained in:
@@ -94,8 +94,9 @@ void EditorSettingsDialog::popup_edit_settings() {
|
||||
set_process_unhandled_input(true);
|
||||
|
||||
// Restore valid window bounds or pop up at default size.
|
||||
if (EditorSettings::get_singleton()->has_setting("interface/dialogs/editor_settings_bounds")) {
|
||||
popup(EditorSettings::get_singleton()->get("interface/dialogs/editor_settings_bounds"));
|
||||
Rect2 saved_size = EditorSettings::get_singleton()->get_project_metadata("dialog_bounds", "editor_settings", Rect2());
|
||||
if (saved_size != Rect2()) {
|
||||
popup(saved_size);
|
||||
} else {
|
||||
|
||||
Size2 popup_size = Size2(900, 700) * editor_get_scale();
|
||||
@@ -132,7 +133,7 @@ void EditorSettingsDialog::_notification(int p_what) {
|
||||
_update_icons();
|
||||
} break;
|
||||
case NOTIFICATION_POPUP_HIDE: {
|
||||
EditorSettings::get_singleton()->set("interface/dialogs/editor_settings_bounds", get_rect());
|
||||
EditorSettings::get_singleton()->set_project_metadata("dialog_bounds", "editor_settings", get_rect());
|
||||
set_process_unhandled_input(false);
|
||||
} break;
|
||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||
|
||||
Reference in New Issue
Block a user