Commit a9374601 authored by Yan's avatar Yan
Browse files

Remember checkState of parameters between files

parent 9fae08bb
......@@ -461,11 +461,18 @@ def update_paramstable(augCanvas):
if len(augCanvas.ms['params']) == 0:
augCanvas.paramstable.setRowCount(0)
return
augCanvas.paramstable.setRowCount(len(augCanvas.ms['params'][0]))
elif len(augCanvas.ms['params'][0]) == augCanvas.paramstable.rowCount():
states = [augCanvas.paramstable.cellWidget(row, 0).checkState()
for row in range(augCanvas.paramstable.rowCount())]
else:
states = False
augCanvas.paramstable.setRowCount(len(augCanvas.ms['params'][0]))
for row, paramname in enumerate(augCanvas.ms['params'][0]):
[augCanvas.paramstable.setItem(row,col, QtWidgets.QTableWidgetItem())
for col in range(1,3)]
augCanvas.paramstable.setCellWidget(row,0,QtWidgets.QCheckBox())
if states:
augCanvas.paramstable.cellWidget(row,0).setCheckState(states[row])
augCanvas.paramstable.item(row,1).setText(paramname)
vals = [param[row] for param in augCanvas.ms['params'][1]
if (param[0] >= augCanvas.chrom['t_start'] and
......
Markdown is supported
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