From 16bbce8f7efc2572adba5f8f430532afffbf9108 Mon Sep 17 00:00:00 2001 From: Olivier Berten Date: Sat, 24 Jul 2010 11:10:59 +0200 Subject: [PATCH] Fix Bug #609430 --- src/swatchbooker.pyw | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/swatchbooker.pyw b/src/swatchbooker.pyw index d3d8dcc..4586324 100755 --- a/src/swatchbooker.pyw +++ b/src/swatchbooker.pyw @@ -332,14 +332,16 @@ class MainWindow(QMainWindow): self.matList.setCurrentItem(self.materials[gridItem.item.material][0]) def gridEdit(self): - if self.cols.value() > 0: - self.sb.book.display['columns'] = self.cols.value() - elif self.cols.value() == 0: - self.sb.book.display['columns'] = False - if self.rows.value() > 0: - self.sb.book.display['rows'] = self.rows.value() - elif self.rows.value() == 0: - self.sb.book.display['rows'] = False + if self.sender() == self.cols: + if self.cols.value() > 0: + self.sb.book.display['columns'] = self.cols.value() + elif self.cols.value() == 0: + self.sb.book.display['columns'] = False + if self.sender() == self.rows: + if self.rows.value() > 0: + self.sb.book.display['rows'] = self.rows.value() + elif self.rows.value() == 0: + self.sb.book.display['rows'] = False if self.gridHorizAction.isChecked(): settings.setValue("gridHoriz",QVariant(True)) self.colsLabel.setText(_("Rows:"))