summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/project_manager.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 79aed36eeb..78f6fe58d0 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -1057,6 +1057,8 @@ public:
}
};
+ bool project_opening_initiated;
+
ProjectList();
~ProjectList();
@@ -1136,6 +1138,7 @@ ProjectList::ProjectList() {
add_child(_scroll_children);
_icon_load_index = 0;
+ project_opening_initiated = false;
}
ProjectList::~ProjectList() {
@@ -1818,7 +1821,9 @@ void ProjectList::_panel_input(const Ref<InputEvent> &p_ev, Node *p_hb) {
emit_signal(SNAME(SIGNAL_SELECTION_CHANGED));
- if (!mb->is_ctrl_pressed() && mb->is_double_click()) {
+ // Do not allow opening a project more than once using a single project manager instance.
+ // Opening the same project in several editor instances at once can lead to various issues.
+ if (!mb->is_ctrl_pressed() && mb->is_double_click() && !project_opening_initiated) {
emit_signal(SNAME(SIGNAL_PROJECT_ASK_OPEN));
}
}
@@ -2140,6 +2145,8 @@ void ProjectManager::_open_selected_projects() {
ERR_FAIL_COND(err);
}
+ _project_list->project_opening_initiated = true;
+
_dim_window();
get_tree()->quit();
}