summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorMihaly Csonka <csonka.mihaly@hotmail.com>2017-09-04 20:45:18 +0200
committerCsonka Mihaly <csonka.mihaly@hotmail.com>2017-09-12 04:30:47 +0200
commit1a7c43e1a1c043b88c079d30166112a8dd4f287b (patch)
treea963c64cd9d3befac81a429523be00f9ad57d9cb /editor
parent8f30c52a3751586edab6d7482425075aef8de6e3 (diff)
downloadredot-engine-1a7c43e1a1c043b88c079d30166112a8dd4f287b.tar.gz
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
Diffstat (limited to 'editor')
-rw-r--r--editor/project_export.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index d649afc594..e5bd6940cb 100644
--- a/editor/project_export.cpp
+++ b/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) {