From 0b37af40b688ac0f68ab32fdefdf246b61dd1979 Mon Sep 17 00:00:00 2001 From: nilshah98 Date: Fri, 7 Jun 2019 12:40:35 +0530 Subject: treeWidget UI bug fixed --- src/kicadtoNgspice/DeviceModel.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/kicadtoNgspice/DeviceModel.py') diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py index 57fd3f25..72d433de 100644 --- a/src/kicadtoNgspice/DeviceModel.py +++ b/src/kicadtoNgspice/DeviceModel.py @@ -65,6 +65,8 @@ class DeviceModel(QtGui.QWidget): print("Reading Device model details from Schematic") for eachline in schematicInfo: + print("=========================================") + print(eachline) words = eachline.split() if eachline[0] == 'q': print("Device Model Transistor: ", words[0]) @@ -82,7 +84,7 @@ class DeviceModel(QtGui.QWidget): try: for key in json_data["deviceModel"]: - if key[0] == eachline[0] and key[1] == eachline[1]: + if key[0] == words[0][0] and key[1:] == words[0][1:]: # print "DEVICE MODEL MATCHING---",child.tag[0],\ # child.tag[1],eachline[0],eachline[1] try: @@ -148,7 +150,7 @@ class DeviceModel(QtGui.QWidget): # global path_name try: for key in json_data["deviceModel"]: - if key[0] == eachline[0] and key[1] == eachline[1]: + if key[0] == words[0][0] and key[1:] == words[0][1:]: # print "DEVICE MODEL MATCHING---",child.tag[0],\ # child.tag[1],eachline[0],eachline[1] try: @@ -213,7 +215,7 @@ class DeviceModel(QtGui.QWidget): # global path_name try: for key in json_data["deviceModel"]: - if key[0] == eachline[0] and key[1] == eachline[1]: + if key[0] == words[0][0] and key[1:] == words[0][1:]: # print "DEVICE MODEL MATCHING---",child.tag[0],\ # child.tag[1],eachline[0],eachline[1] try: @@ -326,7 +328,7 @@ class DeviceModel(QtGui.QWidget): # global path_name try: for key in json_data["deviceModel"]: - if key[0] == eachline[0] and key[1] == eachline[1]: + if key[0] == words[0][0] and key[1:] == words[0][1:]: # print "DEVICE MODEL MATCHING---",child.tag[0],\ # child.tag[1],eachline[0],eachline[1] while i <= end: @@ -408,6 +410,7 @@ class DeviceModel(QtGui.QWidget): self.widgetObjCount = iter_value print("self.widgetObjCount-----", self.widgetObjCount) self.libfile = path_value + print("PATH VALUE", path_value) # print "Selected Library File :",self.libfile # Setting Library to Text Edit Line -- cgit From 8d628dc33e1190dd1f8827bbd26f998d31d0827a Mon Sep 17 00:00:00 2001 From: nilshah98 Date: Fri, 7 Jun 2019 19:25:00 +0530 Subject: projectExplorer made pep8 compliant --- src/kicadtoNgspice/DeviceModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kicadtoNgspice/DeviceModel.py') diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py index 72d433de..6a9ad9d9 100644 --- a/src/kicadtoNgspice/DeviceModel.py +++ b/src/kicadtoNgspice/DeviceModel.py @@ -339,7 +339,7 @@ class DeviceModel(QtGui.QWidget): json_data["deviceModel"][key][0]): path_name = ( json_data["deviceModel"][key][0] - ) + ) else: self.entry_var[i].setText("") i = i + 1 -- cgit From 1d4ee6b6c1254657c497673838922e746f339eca Mon Sep 17 00:00:00 2001 From: nilshah98 Date: Thu, 13 Jun 2019 18:52:12 +0530 Subject: model matching redundancy reduced --- src/kicadtoNgspice/DeviceModel.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/kicadtoNgspice/DeviceModel.py') diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py index 6a9ad9d9..e1367181 100644 --- a/src/kicadtoNgspice/DeviceModel.py +++ b/src/kicadtoNgspice/DeviceModel.py @@ -84,7 +84,7 @@ class DeviceModel(QtGui.QWidget): try: for key in json_data["deviceModel"]: - if key[0] == words[0][0] and key[1:] == words[0][1:]: + if key == words[0]: # print "DEVICE MODEL MATCHING---",child.tag[0],\ # child.tag[1],eachline[0],eachline[1] try: @@ -150,7 +150,7 @@ class DeviceModel(QtGui.QWidget): # global path_name try: for key in json_data["deviceModel"]: - if key[0] == words[0][0] and key[1:] == words[0][1:]: + if key == words[0]: # print "DEVICE MODEL MATCHING---",child.tag[0],\ # child.tag[1],eachline[0],eachline[1] try: @@ -215,7 +215,7 @@ class DeviceModel(QtGui.QWidget): # global path_name try: for key in json_data["deviceModel"]: - if key[0] == words[0][0] and key[1:] == words[0][1:]: + if key == words[0]: # print "DEVICE MODEL MATCHING---",child.tag[0],\ # child.tag[1],eachline[0],eachline[1] try: @@ -328,7 +328,7 @@ class DeviceModel(QtGui.QWidget): # global path_name try: for key in json_data["deviceModel"]: - if key[0] == words[0][0] and key[1:] == words[0][1:]: + if key == words[0]: # print "DEVICE MODEL MATCHING---",child.tag[0],\ # child.tag[1],eachline[0],eachline[1] while i <= end: -- cgit