From 4ebe3cfc7a54cf3a10e17af31a43add107c2aa97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20G=C3=A9czi?= Date: Wed, 18 Dec 2024 00:00:00 +0000 Subject: [PATCH] [map] Move saving of 3d mode setting to framework MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Where the actual final values are determined. And thus avoid saving potentially incorrect values. Signed-off-by: Ferenc Géczi --- map/framework.cpp | 1 + qt/search_panel.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/map/framework.cpp b/map/framework.cpp index 9c519027fc..adbf59f9e1 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -2495,6 +2495,7 @@ void Framework::Allow3dMode(bool allow3d, bool allow3dBuildings) allow3dBuildings = false; m_drapeEngine->Allow3dMode(allow3d, allow3dBuildings); + Save3dMode(allow3d, allow3dBuildings); } void Framework::Save3dMode(bool allow3d, bool allow3dBuildings) diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp index e8bb0c4e41..d49ab0be47 100644 --- a/qt/search_panel.cpp +++ b/qt/search_panel.cpp @@ -188,7 +188,6 @@ bool SearchPanel::Try3dModeCmd(std::string const & str) if (!is3dModeOn && !is3dBuildingsOn && !is3dModeOff) return false; - GetFramework().Save3dMode(is3dModeOn || is3dBuildingsOn, is3dBuildingsOn); GetFramework().Allow3dMode(is3dModeOn || is3dBuildingsOn, is3dBuildingsOn); return true;