projects
/
ejpi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
edb8e8f
)
Fixing issues with deleting random rows
author
Ed Page
<eopage@byu.net>
Wed, 14 Jul 2010 02:44:45 +0000
(21:44 -0500)
committer
Ed Page
<eopage@byu.net>
Wed, 14 Jul 2010 02:44:45 +0000
(21:44 -0500)
src/qhistory.py
patch
|
blob
|
history
diff --git
a/src/qhistory.py
b/src/qhistory.py
index
b5ed27b
..
af164b8
100644
(file)
--- a/
src/qhistory.py
+++ b/
src/qhistory.py
@@
-40,7
+40,7
@@
class QCalcHistory(history.AbstractHistory):
self._historyView.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self._historyView.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
self._historyView.setHeaderHidden(True)
self._historyView.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self._historyView.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
self._historyView.setHeaderHidden(True)
- self._historyView.activated.connect(self._on_delete_row)
+ self._historyView.activated.connect(self._on_row_activated)
viewHeader = self._historyView.header()
viewHeader.setSortIndicatorShown(True)
viewHeader = self._historyView.header()
viewHeader.setSortIndicatorShown(True)
@@
-106,9
+106,10
@@
class QCalcHistory(history.AbstractHistory):
self._rowCount = 0
@misc_utils.log_exception(_moduleLogger)
self._rowCount = 0
@misc_utils.log_exception(_moduleLogger)
- def _on_delete_row(self, index):
+ def _on_row_activated(self, index):
if index.column() == self._CLOSE_COLUMN:
self._historyStore.removeRow(index.row(), index.parent())
if index.column() == self._CLOSE_COLUMN:
self._historyStore.removeRow(index.row(), index.parent())
+ self._rowCount -= 1
elif index.column() == self._RESULT_COLUMN:
self._duplicate_row(index)
else:
elif index.column() == self._RESULT_COLUMN:
self._duplicate_row(index)
else: