Skip to content

Commit acb4a51

Browse files
committed
Changed logic check.
1 parent 4b8b02e commit acb4a51

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmd2/theme.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def register_pt_mapping(style_name: str, pt_ui_names: str | Iterable[str]) -> No
185185
original_size = len(_PT_UI_MAP[style_name])
186186
_PT_UI_MAP[style_name].update(n for n in pt_ui_names if n != style_name)
187187

188-
if len(_PT_UI_MAP[style_name]) > original_size:
188+
if len(_PT_UI_MAP[style_name]) != original_size:
189189
changed = True
190190

191191
# Trigger a re-sync if the theme is already initialized
@@ -228,7 +228,7 @@ def unregister_pt_mapping(style_name: str, pt_ui_names: str | Iterable[str]) ->
228228
for name in pt_ui_names:
229229
_PT_UI_MAP[style_name].discard(name)
230230

231-
changed = len(_PT_UI_MAP[style_name]) < original_size
231+
changed = len(_PT_UI_MAP[style_name]) != original_size
232232

233233
# Trigger a re-sync if the theme is already initialized
234234
if changed and _PT_THEME is not None:

0 commit comments

Comments
 (0)