update code, switch to loguru
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
from .sources.Ui_dialog_settings import Ui_Dialog
|
||||
from PyQt6 import QtWidgets, QtCore
|
||||
from src import config, log
|
||||
from src.utils import Icon
|
||||
from src import config
|
||||
from src.utils import debugMessage as dbg
|
||||
from omegaconf import OmegaConf
|
||||
import os
|
||||
|
||||
@@ -192,7 +191,7 @@ class Settings(QtWidgets.QDialog, Ui_Dialog):
|
||||
if changed == original:
|
||||
self.settingschanged = False
|
||||
self.restart_required = False
|
||||
dbg("Settings not changed")
|
||||
log.info("Settings not changed")
|
||||
else:
|
||||
self.settingschanged = True
|
||||
#compare if database or shortcuts were changed
|
||||
@@ -200,7 +199,11 @@ class Settings(QtWidgets.QDialog, Ui_Dialog):
|
||||
shortcuts = self.shortcuts == self.sortShortcuts(changed.shortcuts)
|
||||
if not database or not shortcuts:
|
||||
self.restart_required = True
|
||||
dbg(f"Settings changed, restart required: {self.restart_required}",database=database,shortcuts=shortcuts)
|
||||
log.info(
|
||||
f"Settings changed, restart required: {self.restart_required}",
|
||||
database=database,
|
||||
shortcuts=shortcuts,
|
||||
)
|
||||
|
||||
# save the new settings
|
||||
if self.settingschanged:
|
||||
|
||||
Reference in New Issue
Block a user