Skip to content

Commit

Permalink
Correctly read and set the settings value for sound effects in mainwi…
Browse files Browse the repository at this point in the history
…ndow.py (#338)
  • Loading branch information
jvdwetering authored Jul 22, 2024
1 parent ec45b4f commit e6fab5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zxlive/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import pyperclip

from .base_panel import BasePanel
from .common import GraphT, get_data, new_graph, to_tikz, from_tikz
from .common import GraphT, get_data, new_graph, to_tikz, from_tikz, get_settings_value, set_settings_value
from .construct import *
from .custom_rule import CustomRule, check_rule
from .dialogs import (FileFormat, ImportGraphOutput, ImportProofOutput,
Expand Down Expand Up @@ -600,11 +600,11 @@ def update_colors(self) -> None:

@property
def sfx_on(self) -> bool:
return self.settings.value("sound-effects")
return get_settings_value("sound-effects",bool,False,self.settings)

@sfx_on.setter
def sfx_on(self, value: bool) -> None:
self.settings.setValue("sound-effects", value)
set_settings_value("sound-effects", value,bool,self.settings)

def play_sound(self, s: SFXEnum) -> None:
if self.sfx_on:
Expand Down

0 comments on commit e6fab5f

Please sign in to comment.