Skip to content

Commit 20d5343

Browse files
sp00ktoberclaude
andcommitted
fix(studio): the header's buttons keep their size while the watch status is empty
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 0b25e2c commit 20d5343

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎apps/studio/src/mhfu_studio/monster/panels/behaviour.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ def _status(self) -> None:
542542
FIRE_TIP.format(triggers.title(t)) if why is None else f"Fire: {why}"
543543
)
544544
w = self.ws.watch
545-
self.live.setVisible(w.on)
546545
self.live.setText(w.status)
547546
self.live.setToolTip(w.status)
548547
self.live.set_level(None if w.fires is not None else "warning")

‎apps/studio/tests/monster/ui/test_marks.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ def scope(qtbot: Any, p: BehaviourPanel, key: str) -> None:
116116

117117

118118
def test_nothing_is_marked_until_the_toggle_is_on(panel: BehaviourPanel, game: FakeGame) -> None:
119-
assert not panel.watch.isChecked() and panel.live.isHidden() and not panel.ticker.isActive()
119+
assert not panel.watch.isChecked() and panel.live.text() == ""
120+
assert not panel.ticker.isActive()
120121
assert all("×" not in t for t in titles(panel))
121122
assert panel.outline.width() == triggers.WIDTH and game.calls == []
122123
assert panel.watch.toolTip() and kit.missing_tips(panel) == []
@@ -127,13 +128,13 @@ def test_the_toggle_starts_a_poll_once_a_second_while_the_tab_is_shown(
127128
) -> None:
128129
QTest.mouseClick(panel.watch, LEFT, NONE)
129130
assert panel.ws.watch.on and panel.ticker.isActive() and panel.ticker.interval() == 1000
130-
assert not panel.live.isHidden()
131+
assert panel.live.text() == rg.READING
131132
panel.hide()
132133
assert not panel.ticker.isActive()
133134
panel.show()
134135
assert panel.ticker.isActive()
135136
QTest.mouseClick(panel.watch, LEFT, NONE)
136-
assert not panel.ws.watch.on and not panel.ticker.isActive() and panel.live.isHidden()
137+
assert not panel.ws.watch.on and not panel.ticker.isActive() and panel.live.text() == ""
137138

138139

139140
def test_a_tab_hidden_polls_nothing(

0 commit comments

Comments
 (0)