From be8014e0aa9aed13fcc047bc8c366fa3782bf93d Mon Sep 17 00:00:00 2001 From: D-AIRY <admin@ds-servers.com> Date: Thu, 16 Jan 2025 18:02:45 +0300 Subject: [PATCH] Save IgnoreGroups state --- source/terrax/terrax.cpp | 16 ++++++++++++++++ source/terrax/terrax.h | 1 + 2 files changed, 17 insertions(+) diff --git a/source/terrax/terrax.cpp b/source/terrax/terrax.cpp index 3c256fea7..3b1fa6d3f 100644 --- a/source/terrax/terrax.cpp +++ b/source/terrax/terrax.cpp @@ -932,6 +932,19 @@ int main(int argc, char **argv) } } + XUpdateStatusGrid(); + + szVal = pCfg->getKey("terrax", "ignore_groups"); + if(szVal) + { + int iVal = 0; + if(sscanf(szVal, "%d", &iVal)) + { + g_xConfig.m_bIgnoreGroups = iVal != 0; + CheckToolbarButton(ID_IGNORE_GROUPS, g_xConfig.m_bIgnoreGroups); + } + } + for(UINT i = 0; i < 4; ++i) { float3 vec; @@ -1079,6 +1092,9 @@ int main(int argc, char **argv) sprintf_s(szVal, "%d", g_xConfig.m_bShowGrid ? 1 : 0); pCfg->set("terrax", "grid_show", szVal); + sprintf_s(szVal, "%d", g_xConfig.m_bIgnoreGroups ? 1 : 0); + pCfg->set("terrax", "ignore_groups", szVal); + pCfg->save(); mem_release(pCfg); diff --git a/source/terrax/terrax.h b/source/terrax/terrax.h index 0f512ce83..5b96dbd41 100644 --- a/source/terrax/terrax.h +++ b/source/terrax/terrax.h @@ -299,6 +299,7 @@ bool XIsMouseInBound(X_WINDOW_POS wnd, const float3_t &vBoundMin, const float3_t void XUpdatePropWindow(); void XUpdateGizmos(); +void XUpdateStatusGrid(); void XInitTypesCombo(); -- GitLab