From 28f07272cc174efe8e219abed683d22f72f18d94 Mon Sep 17 00:00:00 2001 From: tassaron Date: Sun, 11 Jun 2017 17:03:40 -0400 Subject: using tab in component list updates widget and more understandable function names for writing/reading presets --- mainwindow.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mainwindow.py') diff --git a/mainwindow.py b/mainwindow.py index 2f04559..dbbc631 100644 --- a/mainwindow.py +++ b/mainwindow.py @@ -1,6 +1,5 @@ from os.path import expanduser from queue import Queue -from collections import OrderedDict from PyQt4 import QtCore, QtGui, uic from PyQt4.QtCore import QSettings, Qt from PyQt4.QtGui import QMenu @@ -159,8 +158,8 @@ class MainWindow(QtCore.QObject): self.window.pushButton_addComponent.setMenu(self.compMenu) componentList.dropEvent = self.componentListChanged - componentList.clicked.connect( - lambda _: self.changeComponentWidget()) + componentList.itemSelectionChanged.connect( + self.changeComponentWidget) self.window.pushButton_removeComponent.clicked.connect( lambda _: self.removeComponent()) @@ -567,7 +566,7 @@ class MainWindow(QtCore.QObject): # version, not used yet i += 1 elif i == 2: - saveValueStore = dict(eval(line)) + saveValueStore = core.Core.presetFromString(line) self.core.selectedComponents[-1].loadPreset( saveValueStore) self.updateComponentTitle(-1) -- cgit v1.2.3