Commit 9720776c authored by Yan's avatar Yan
Browse files

Fixed autozoomy button, fixed config

* config is not rewroting False variables to True anymore
* autozoomy is called with valid argument from __main__
* minor formatting
parent f10cd910
......@@ -325,18 +325,18 @@ def main():
checked=config.value("view/autozoomy", type=bool))
autozoomy.triggered.connect(lambda: config.setValue(
"view/autozoomy", autozoomy.isChecked()))
autozoomy.triggered.connect(lambda: gt.autozoomy(augCanvas.spectrum))
autozoomy.triggered.connect(lambda: gt.autozoomy(augCanvas.spectplot))
intensitiesact = QtWidgets.QAction(
"&Show intensities", None, checkable=True, checked=config.value(
"view/intensities", type=bool))
"&Show intensities", None, checkable=True,
checked=config.value("view/intensities", type=bool))
intensitiesact.triggered.connect(lambda: config.setValue(
"view/intensities", intensitiesact.isChecked()))
intensitiesact.triggered.connect(lambda: gt.ann_spec(
intensitiesact.triggered.connect(lambda: augCanvas.draw())
oddevenact = QtWidgets.QAction(
"&Odd / even", None, checkable=True, checked=config.value(
"view/oddeven", type=bool))
"&Odd / even", None, checkable=True,
checked=config.value("view/oddeven", type=bool))
lambda: oddeven_changed(augCanvas, config, oddevenact))
......@@ -20,8 +20,8 @@ def settings():
("imggen/yinch", 4),
("imggen/dpi", 300),
("imggen/xtics", 5)}
[settings.setValue(i[0], i[1])
for i in defvals if not settings.value(i[0])]
[print("will set value", i[0])
for i in defvals if not settings.contains(i[0])]
return settings
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment