diff options
| author | shezdy <77217897+shezdy@users.noreply.github.com> | 2026-04-30 13:10:03 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-30 20:10:03 +0100 |
| commit | 546cc71565cd2ccd9277febb14dcebf513ace623 (patch) | |
| tree | fe0cbe8e7e415f77158965cd11925572efc30fb7 /src/config/shared/workspace/WorkspaceRule.cpp | |
| parent | bac49db9a11d5398963f4ad3265a577f8e94dc66 (diff) | |
config/workspace-rules: support modifying persistent and monitor (#14217)
* workspace rules: support modifying persistent and monitor
* support modifying isDefault
Diffstat (limited to 'src/config/shared/workspace/WorkspaceRule.cpp')
| -rw-r--r-- | src/config/shared/workspace/WorkspaceRule.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/config/shared/workspace/WorkspaceRule.cpp b/src/config/shared/workspace/WorkspaceRule.cpp index 28d5fcab..dfd77d42 100644 --- a/src/config/shared/workspace/WorkspaceRule.cpp +++ b/src/config/shared/workspace/WorkspaceRule.cpp @@ -3,7 +3,7 @@ using namespace Config; void CWorkspaceRule::mergeLeft(const CWorkspaceRule& other) { - if (m_monitor.empty()) + if (!other.m_monitor.empty()) m_monitor = other.m_monitor; if (m_workspaceString.empty()) m_workspaceString = other.m_workspaceString; @@ -12,10 +12,10 @@ void CWorkspaceRule::mergeLeft(const CWorkspaceRule& other) { if (m_workspaceId == WORKSPACE_INVALID) m_workspaceId = other.m_workspaceId; - if (other.m_isDefault) - m_isDefault = true; - if (other.m_isPersistent) - m_isPersistent = true; + if (other.m_isDefault.has_value()) + m_isDefault = other.m_isDefault; + if (other.m_isPersistent.has_value()) + m_isPersistent = other.m_isPersistent; if (other.m_gapsIn.has_value()) m_gapsIn = other.m_gapsIn; if (other.m_gapsOut.has_value()) |
