From 4f715095d4bb89d6599854f39ae913e9eeefa493 Mon Sep 17 00:00:00 2001 From: CL4R3T Date: Fri, 22 Nov 2024 16:19:19 +0800 Subject: [PATCH] Revert "fix: issue #379" This reverts commit 98b539036ee5280769356e9e593041915e8f4ef0. --- app/card/pushsettingcard1.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/card/pushsettingcard1.py b/app/card/pushsettingcard1.py index 2e3f6ee0..1ec31b79 100644 --- a/app/card/pushsettingcard1.py +++ b/app/card/pushsettingcard1.py @@ -84,7 +84,7 @@ def keyPressEvent(self, e: QKeyEvent): class PushSettingCardInstance(PushSettingCard): def __init__(self, text, icon: Union[str, QIcon, FluentIconBase], title, configname, configtemplate, parent=None): self.configtemplate = configtemplate - self.configvalue = cfg.get_value(configname).copy() + self.configvalue = cfg.get_value(configname) super().__init__(text, icon, title, configname, str(self.configvalue), parent) self.button.clicked.connect(self.__onclicked) @@ -93,13 +93,13 @@ def __onclicked(self): if message_box.exec(): for type, combobox in message_box.comboBox_dict.items(): self.configvalue[type] = combobox.text().split('(')[0] - cfg.set_value(self.configname, self.configvalue.copy()) + cfg.set_value(self.configname, self.configvalue) self.contentLabel.setText(str(self.configvalue)) class PushSettingCardNotifyTemplate(PushSettingCard): def __init__(self, text, icon: Union[str, QIcon, FluentIconBase], title, configname, parent=None): - self.configvalue = cfg.get_value(configname).copy() + self.configvalue = cfg.get_value(configname) super().__init__(text, icon, title, configname, "", parent) self.button.clicked.connect(self.__onclicked) @@ -108,7 +108,7 @@ def __onclicked(self): if message_box.exec(): for id, lineedit in message_box.lineEdit_dict.items(): self.configvalue[id] = lineedit.text().replace(r"\n", "\n") - cfg.set_value(self.configname, self.configvalue.copy()) + cfg.set_value(self.configname, self.configvalue) class PushSettingCardTeam(PushSettingCard):