Skip to content

Commit

Permalink
fix color dialog bug
Browse files Browse the repository at this point in the history
  • Loading branch information
patricev committed Feb 23, 2016
1 parent 0a6ef29 commit c666e79
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dialogs/posttelemacusercolorrampdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,23 @@ def addrow(self):
def removerow(self):
introw = self.tableWidget.currentRow()
self.tableWidget.removeRow(introw)
self.tableWidget.setItem(introw, 1, QtGui.QTableWidgetItem(self.tableWidget.item(introw-1,2)))
if introw != 0 and introw != (self.tableWidget.rowCount()):
self.tableWidget.setItem(introw, 1, QtGui.QTableWidgetItem(self.tableWidget.item(introw-1,2)))


def checkUpperLower(self, row,column):
try:
self.tableWidget.cellChanged.disconnect(self.checkUpperLower)
except Excetion, e:
pass
if column == 1:
self.tableWidget.setItem(row-1, 2, QtGui.QTableWidgetItem(self.tableWidget.item(row,column)))
elif column == 2:
self.tableWidget.setItem(row+1, 1, QtGui.QTableWidgetItem(self.tableWidget.item(row,column)))

self.tableWidget.cellChanged.connect(self.checkUpperLower)




def dialogIsFinished(self):
Expand Down

0 comments on commit c666e79

Please sign in to comment.