Skip to content

Commit

Permalink
Fix config corruption
Browse files Browse the repository at this point in the history
The previous commit may set your sg1,sg2,audio_sg to QVariant([]) rather
than "[]".
  • Loading branch information
1over137 committed Mar 21, 2024
1 parent b98a4c2 commit 93eaad9
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions vocabsieve/config/base_tab.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
from PyQt5.QtWidgets import (QDialog, QStatusBar, QCheckBox, QComboBox, QLineEdit,
QSpinBox, QPushButton, QSlider, QLabel, QHBoxLayout,
QWidget, QTabWidget, QMessageBox, QColorDialog, QListWidget,
QFormLayout, QGridLayout, QVBoxLayout
)
from PyQt5.QtWidgets import (QCheckBox, QComboBox, QLineEdit, QSpinBox, QSlider, QWidget, QListWidget)
from PyQt5.QtCore import QTimer
from enum import Enum
import json
Expand Down Expand Up @@ -56,10 +52,6 @@ def update_map(v):
def update_json(v):
settings.setValue(key, json.dumps(v))

# Initialize the setting if not present
if settings.value(key) is None:
settings.setValue(key, default)

if isinstance(widget, QCheckBox):
widget.setChecked(settings.value(key, default, type=bool))
widget.clicked.connect(update)
Expand Down

0 comments on commit 93eaad9

Please sign in to comment.