OSSP CVS Repository

ossp - Check-in [3912]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3912
Date: 2002-Dec-20 19:02:36 (local)
2002-Dec-20 18:02:36 (UTC)
User:ms
Branch:
Comment: Fix selection and highlighting problem on row sort.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_table.cpp      1.18 -> 1.19     5 inserted, 0 deleted

ossp-pkg/as/as-gui/as_table.cpp 1.18 -> 1.19

--- as_table.cpp 2002/12/20 17:42:10     1.18
+++ as_table.cpp 2002/12/20 18:02:36     1.19
@@ -125,6 +125,11 @@
     this->setSortcol(nCol);
     QTable::sortColumn(nCol, this->getSortdir(), true);
 
+    // Move and display the selection highlight
+    this->removeSelection(this->currentSelection());
+    this->selectRow(this->currentRow());
+    this->ensureCellVisible(this->currentRow(), 0);
+
     // Write nonsaving line numbers for all rows
     for (int nIter = this->numRows() - 1; nIter >= 0; nIter--)
         this->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0')));

CVSTrac 2.0.1