Skip to content

Commit 69b101c

Browse files
authored
fix: plot and theme toggle at the same time (#132)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent ccbaab5 commit 69b101c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/uproot_browser/tui/browser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ def action_quit_with_dump(self) -> None:
132132

133133
def action_toggle_theme(self) -> None:
134134
"""An action to toggle dark mode."""
135-
self.dark = not self.dark
135+
dark = not self.dark
136136
if self.plot_widget.item:
137-
self.plot_widget.item.theme = "dark" if self.dark else "default"
138-
self.plot_widget.refresh()
137+
self.plot_widget.item.theme = "dark" if dark else "default"
138+
self.dark = dark
139139

140140
def on_uproot_selected(self, message: UprootSelected) -> None:
141141
"""A message sent by the tree when a file is clicked."""

0 commit comments

Comments
 (0)