configure, stricklers: Work on copy and apply when click ok.

mesh
Pierre-Antoine Rouby 2023-05-23 09:26:49 +02:00
parent 70fac8e6e3
commit 7afcdb4877
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from copy import deepcopy
from config import Config
from View.ASubWindow import ASubWindow
from View.ListedSubWindow import ListedSubWindow
@ -110,7 +111,7 @@ class ConfigureWindow(ASubWindow, ListedSubWindow):
# Stricklers
table = self.find(QTableView, f"tableView_stricklers")
self._stricklers = self.conf.stricklers
self._stricklers = deepcopy(self.conf.stricklers)
self._stricklers_table = TableModel(
data = self._stricklers,
undo = self._undo_stack,
@ -180,6 +181,9 @@ class ConfigureWindow(ASubWindow, ListedSubWindow):
self.conf.backup_frequence = self.get_time_edit("timeEdit_backup_frequence")
self.conf.backup_max = self.get_spin_box("spinBox_backup_max")
# Stricklers
self.conf.stricklers = deepcopy(self._stricklers)
# Language
self.conf.lang = Config.languages()[self.get_combobox_text("comboBox_language")]