ossp-pkg/as/as-gui/as_table.cpp 1.17 -> 1.18
--- as_table.cpp 2002/12/18 14:50:58 1.17
+++ as_table.cpp 2002/12/20 17:42:10 1.18
@@ -116,8 +116,14 @@
// widgets to influence dirty or clean state of table data
void TiTable::sortColumn(int nCol, bool bAscend, bool bWhole)
{
+ // Guard against a repeat sort behaviour
+ if (nCol == this->getSortcol() && bAscend == this->getSortdir())
+ this->setSortdir(!bAscend);
+ else
+ this->setSortdir(bAscend);
+
this->setSortcol(nCol);
- QTable::sortColumn(nCol, bAscend, true);
+ QTable::sortColumn(nCol, this->getSortdir(), true);
// Write nonsaving line numbers for all rows
for (int nIter = this->numRows() - 1; nIter >= 0; nIter--)
|
|