فهرست منبع

Fixed clearing of an export preset's name when deleting the one above it.

Deleting an export preset cleared the name of the item below it. This was
caused by ProjectExportDialog::_edit_preset(-1) which sets the deleted preset's
data to empty values. This on its turn called
ProjectExportDialog::_name_changed() which operates on the new current preset
(the one under the deleted item).

Fixes issue #10842
Mihaly Csonka 8 سال پیش
والد
کامیت
1a7c43e1a1
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      editor/project_export.cpp

+ 2 - 1
editor/project_export.cpp

@@ -425,9 +425,10 @@ void ProjectExportDialog::_delete_preset_confirm() {
 
 	int idx = presets->get_current();
 	parameters->edit(NULL); //to avoid crash
+	_edit_preset(-1);
 	EditorExport::get_singleton()->remove_export_preset(idx);
 	_update_presets();
-	_edit_preset(-1);
+	_edit_preset(presets->get_current());
 }
 
 Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) {