Skip to content

Commit

Permalink
Save 'use OpenGL' to config when app exits
Browse files Browse the repository at this point in the history
  • Loading branch information
truenicoco committed Jul 21, 2020
1 parent 7a00f59 commit 9141fe0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hh_creator/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ def __init__(self):
else:
self.replay_action_cursor = 0

self.actionOpenGL.setChecked(config.config["animation"].getboolean("opengl"))

self._make_table_scene()
self.show()
if config.geometry is not None:
Expand Down Expand Up @@ -359,6 +361,7 @@ def on_actionOpenGL_triggered(self, checked):
self.graphics_view.setViewport(QtWidgets.QOpenGLWidget())
else:
self.graphics_view.setViewport(QtWidgets.QWidget())
config.config["animation"]["opengl"] = str(checked)

@pyqtSlot()
def on_actionRestoreConfig_triggered(self):
Expand Down
1 change: 1 addition & 0 deletions hh_creator/resource/default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ bets_to_pot_animation_duration = 200
last_action_duration = 1500
pot_to_winner_duration = 200
stack_to_bet_duration = 350
opengl = False

# positions are top left corner, except for texts (center)
[position]
Expand Down

0 comments on commit 9141fe0

Please sign in to comment.