Skip to content

Commit 4db32a4

Browse files
committed
pncconf -fix loading of 'discovered' firmware
If one used 'discovery' to build a config, then reloade the config, It would fail. I think code not converted fro gtk2 to gtk3. Access to combo box's model is slightly different
1 parent 8c9f5da commit 4db32a4

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/emc/usr_intf/pncconf/pncconf.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2140,10 +2140,10 @@ def init_mesa_options(self,boardnum):
21402140
dbg('Looking for firmware data %s'%self.d["mesa%d_firmware"% boardnum])
21412141
found = False
21422142
search = 0
2143-
model = self.widgets["mesa%d_firmware"% boardnum].get_model()
2144-
for search,item in enumerate(model):
2145-
dbg('%d,%s'%(search,model[search][0]))
2146-
if model[search][0] == self.d["mesa%d_firmware"% boardnum]:
2143+
combo_model = self.widgets["mesa%d_firmware"% boardnum].get_model()
2144+
for search,item in enumerate(combo_model):
2145+
dbg('%d,%s'%(search,combo_model[search][0]))
2146+
if combo_model[search][0] == self.d["mesa%d_firmware"% boardnum]:
21472147
self.widgets["mesa%d_firmware"% boardnum].set_active(search)
21482148
found = True
21492149
dbg('found firmware # %d'% search)
@@ -2152,9 +2152,10 @@ def init_mesa_options(self,boardnum):
21522152
dbg('firmware not found')
21532153
cur_firm = self.d['mesa%d_currentfirmwaredata'% boardnum][_PD._FIRMWARE]
21542154
dbg('looking for: %s'% cur_firm )
2155+
combo = self.widgets["mesa%d_firmware"% boardnum]
21552156
#self.widgets["mesa%d_firmware"% boardnum].set_active(0)
21562157
self._p.MESA_FIRMWAREDATA.append(self.d['mesa%d_currentfirmwaredata'% boardnum])
2157-
model.append((cur_firm,))
2158+
combo.append_text(cur_firm)
21582159
self.init_mesa_options(boardnum)
21592160
return
21602161
else:

0 commit comments

Comments
 (0)