mirror of https://gitlab.com/pamhyr/pamhyr2
configure, stricklers: Work on copy and apply when click ok.
parent
70fac8e6e3
commit
7afcdb4877
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from copy import deepcopy
|
||||||
from config import Config
|
from config import Config
|
||||||
from View.ASubWindow import ASubWindow
|
from View.ASubWindow import ASubWindow
|
||||||
from View.ListedSubWindow import ListedSubWindow
|
from View.ListedSubWindow import ListedSubWindow
|
||||||
|
|
@ -110,7 +111,7 @@ class ConfigureWindow(ASubWindow, ListedSubWindow):
|
||||||
|
|
||||||
# Stricklers
|
# Stricklers
|
||||||
table = self.find(QTableView, f"tableView_stricklers")
|
table = self.find(QTableView, f"tableView_stricklers")
|
||||||
self._stricklers = self.conf.stricklers
|
self._stricklers = deepcopy(self.conf.stricklers)
|
||||||
self._stricklers_table = TableModel(
|
self._stricklers_table = TableModel(
|
||||||
data = self._stricklers,
|
data = self._stricklers,
|
||||||
undo = self._undo_stack,
|
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_frequence = self.get_time_edit("timeEdit_backup_frequence")
|
||||||
self.conf.backup_max = self.get_spin_box("spinBox_backup_max")
|
self.conf.backup_max = self.get_spin_box("spinBox_backup_max")
|
||||||
|
|
||||||
|
# Stricklers
|
||||||
|
self.conf.stricklers = deepcopy(self._stricklers)
|
||||||
|
|
||||||
# Language
|
# Language
|
||||||
self.conf.lang = Config.languages()[self.get_combobox_text("comboBox_language")]
|
self.conf.lang = Config.languages()[self.get_combobox_text("comboBox_language")]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue