Don't send default setting to engine

Sending default setting on first view of a section/tool to the engine
triggers the "you have changes" mechanism. Sending them just in case
isn't needed unless there is a bug in a different place.

Drop this preemptive measure.

Fixes: #3029
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2026-06-06 09:19:57 +02:00
parent 52dee75c47
commit 628713859f
3 changed files with 8 additions and 7 deletions
@@ -329,7 +329,7 @@ void EnvironmentSidebar::OnFirstDisplay()
qry_effects.Post();
m_PostEffectList->SetChoices(*qry_effects.posteffects);
UpdateEnvironmentSettings();
UpdateEnvironmentSettings(false);
}
void EnvironmentSidebar::OnMapReload()
@@ -342,13 +342,17 @@ void EnvironmentSidebar::RecomputeWaterData(wxCommandEvent& WXUNUSED(evt))
POST_COMMAND(RecalculateWaterData, (0.0f));
}
void EnvironmentSidebar::UpdateEnvironmentSettings()
void EnvironmentSidebar::UpdateEnvironmentSettings(bool sendToEngine)
{
AtlasMessage::qGetEnvironmentSettings qry_env;
qry_env.Post();
g_EnvironmentSettings = qry_env.settings;
g_EnvironmentSettings.NotifyObservers();
if (sendToEngine)
g_EnvironmentSettings.NotifyObservers();
else
g_EnvironmentSettings.NotifyObserversExcept(m_Conn);
}
void EnvironmentSidebar::OnPickWaterHeight(wxCommandEvent& WXUNUSED(evt))
@@ -31,7 +31,7 @@ public:
void OnMapReload() override;
void UpdateEnvironmentSettings();
void UpdateEnvironmentSettings(bool sendToEngine = true);
protected:
void OnFirstDisplay() override;
@@ -856,9 +856,6 @@ void PlayerSettingsControl::ReadFromEngine()
++playerDefs;
}
// Send default properties to engine, since they might not be set
SendToEngine();
m_InGUIUpdate = false;
}