@@ -293,8 +293,7 @@ void Polygon2DEditor::_uv_edit_mode_select(int p_mode) {
293293}
294294
295295void Polygon2DEditor::_uv_edit_popup_hide () {
296- EditorSettings::get_singleton ()->set (" interface/dialogs/uv_editor_bounds" , Rect2 (uv_edit->get_position (), uv_edit->get_size ()));
297-
296+ EditorSettings::get_singleton ()->set_project_metadata (" dialog_bounds" , " uv_editor" , Rect2 (uv_edit->get_position (), uv_edit->get_size ()));
298297 _cancel_editing ();
299298}
300299
@@ -321,8 +320,9 @@ void Polygon2DEditor::_menu_option(int p_option) {
321320 undo_redo->commit_action ();
322321 }
323322
324- if (EditorSettings::get_singleton ()->has_setting (" interface/dialogs/uv_editor_bounds" )) {
325- uv_edit->popup (EDITOR_GET (" interface/dialogs/uv_editor_bounds" ));
323+ const Rect2 bounds = EditorSettings::get_singleton ()->get_project_metadata (" dialog_bounds" , " uv_editor" , Rect2 ());
324+ if (bounds.has_area ()) {
325+ uv_edit->popup (bounds);
326326 } else {
327327 uv_edit->popup_centered_ratio (0.85 );
328328 }
@@ -1308,6 +1308,7 @@ Polygon2DEditor::Polygon2DEditor() {
13081308 uv_edit = memnew (AcceptDialog);
13091309 add_child (uv_edit);
13101310 uv_edit->set_title (TTR (" Polygon 2D UV Editor" ));
1311+ uv_edit->connect (" confirmed" , callable_mp (this , &Polygon2DEditor::_uv_edit_popup_hide));
13111312 uv_edit->connect (" canceled" , callable_mp (this , &Polygon2DEditor::_uv_edit_popup_hide));
13121313
13131314 VBoxContainer *uv_main_vb = memnew (VBoxContainer);
0 commit comments