Skip to content

Commit

Permalink
Wyeliminowanie błędów python przy braku pliku json
Browse files Browse the repository at this point in the history
  • Loading branch information
JanPaJ committed Aug 2, 2022
1 parent ca55d84 commit efe5d37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions QuickPrint.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ def __init__(self, iface : QgisInterface, parent : QtWidgets=None) -> None:
self.create_composer)
self.setup_rubberband()
self.conf = Config()
try:
if 'font_changed' in self.conf.setts.keys():
if self.conf.setts['font_changed']:
self.set_font_quickprint(QSettings().value("qgis/stylesheet/fontPointSize"))
except KeyError:
else:
self.conf.set_value('font_changed', False)
self.conf.save_config()

Expand Down
8 changes: 4 additions & 4 deletions giap_dynamic_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ def _section_control(self, tabind: int) -> None:
scrll = QScrollArea(self)
scrll.setWidgetResizable(True)
scrll.setWidget(self.instr)
try:
if 'font_changed' in self.conf.setts.keys():
value = QSettings().value("qgis/stylesheet/fontPointSize") if \
self.conf.setts["font_changed"] else 9
except KeyError:
else:
value = 9
self.instr.setStyleSheet(
f"""QFrame, QLabel, QToolTip, QTextEdit{{
Expand Down Expand Up @@ -1161,10 +1161,10 @@ def __init__(self, lab: str, parent: QtWidgets=None) -> None:
self.setAttribute(Qt.WA_DeleteOnClose)
self.setText(lab)
self.conf = Config()
try:
if 'font_changed' in self.conf.setts.keys():
value = QSettings().value("qgis/stylesheet/fontPointSize") if \
self.conf.setts["font_changed"] else 10
except KeyError:
else:
value = 10
self.setStyleSheet(
f'font:{value}pt "Segoe UI"; font-weight: normal; '
Expand Down

0 comments on commit efe5d37

Please sign in to comment.