summaryrefslogtreecommitdiff
path: root/modules/mono/editor
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono/editor')
-rw-r--r--modules/mono/editor/godotsharp_editor.cpp8
-rw-r--r--modules/mono/editor/mono_bottom_panel.cpp10
2 files changed, 13 insertions, 5 deletions
diff --git a/modules/mono/editor/godotsharp_editor.cpp b/modules/mono/editor/godotsharp_editor.cpp
index f27511ad5e..cce86efbf5 100644
--- a/modules/mono/editor/godotsharp_editor.cpp
+++ b/modules/mono/editor/godotsharp_editor.cpp
@@ -475,7 +475,9 @@ MonoReloadNode *MonoReloadNode::singleton = NULL;
void MonoReloadNode::_reload_timer_timeout() {
- CSharpLanguage::get_singleton()->reload_assemblies_if_needed(false);
+ if (CSharpLanguage::get_singleton()->is_assembly_reloading_needed()) {
+ CSharpLanguage::get_singleton()->reload_assemblies(false);
+ }
}
void MonoReloadNode::restart_reload_timer() {
@@ -493,7 +495,9 @@ void MonoReloadNode::_notification(int p_what) {
switch (p_what) {
case MainLoop::NOTIFICATION_WM_FOCUS_IN: {
restart_reload_timer();
- CSharpLanguage::get_singleton()->reload_assemblies_if_needed(true);
+ if (CSharpLanguage::get_singleton()->is_assembly_reloading_needed()) {
+ CSharpLanguage::get_singleton()->reload_assemblies(false);
+ }
} break;
default: {
} break;
diff --git a/modules/mono/editor/mono_bottom_panel.cpp b/modules/mono/editor/mono_bottom_panel.cpp
index d7bfa54aba..e89d21d92d 100644
--- a/modules/mono/editor/mono_bottom_panel.cpp
+++ b/modules/mono/editor/mono_bottom_panel.cpp
@@ -154,10 +154,14 @@ void MonoBottomPanel::_build_project_pressed() {
Error metadata_err = CSharpProject::generate_scripts_metadata(GodotSharpDirs::get_project_csproj_path(), scripts_metadata_path);
ERR_FAIL_COND(metadata_err != OK);
- GodotSharpBuilds::get_singleton()->build_project_blocking("Tools");
+ bool build_success = GodotSharpBuilds::get_singleton()->build_project_blocking("Tools");
- MonoReloadNode::get_singleton()->restart_reload_timer();
- CSharpLanguage::get_singleton()->reload_assemblies_if_needed(true);
+ if (build_success) {
+ MonoReloadNode::get_singleton()->restart_reload_timer();
+ if (CSharpLanguage::get_singleton()->is_assembly_reloading_needed()) {
+ CSharpLanguage::get_singleton()->reload_assemblies(false);
+ }
+ }
}
void MonoBottomPanel::_view_log_pressed() {