From 9141fe0ac8febcbbff64504037d7309817d61038 Mon Sep 17 00:00:00 2001 From: Nicolas Cedilnik Date: Tue, 21 Jul 2020 19:26:16 +0200 Subject: [PATCH] Save 'use OpenGL' to config when app exits --- hh_creator/main_window.py | 3 +++ hh_creator/resource/default.ini | 1 + 2 files changed, 4 insertions(+) diff --git a/hh_creator/main_window.py b/hh_creator/main_window.py index da9b60e..4618479 100644 --- a/hh_creator/main_window.py +++ b/hh_creator/main_window.py @@ -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: @@ -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): diff --git a/hh_creator/resource/default.ini b/hh_creator/resource/default.ini index fe2444a..6672173 100644 --- a/hh_creator/resource/default.ini +++ b/hh_creator/resource/default.ini @@ -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]