ossp-pkg/as/as-gui/as_table.cpp 1.13 -> 1.14
--- as_table.cpp 2002/12/13 19:36:24 1.13
+++ as_table.cpp 2002/12/16 17:13:17 1.14
@@ -105,9 +105,21 @@
if (this->numRows() > 0) {
// If a cell was edited, emit a signal indicating so
// We can't rely on valueChanged for unknown reasons
- if (nText != this->text(nRow, nCol))
+ if (nText != this->text(nRow, nCol) && nCol != TITRAQ_IDXLINE)
emit textEdited();
QTable::setText(nRow, nCol, nText);
}
}
+
+// Overridden member hack to allow externally connected control
+// widgets to influence dirty or clean state of table data
+void TiTable::sortColumn(int nCol, bool bAscend, bool bWhole)
+{
+ this->setSortcol(nCol);
+ QTable::sortColumn(nCol, bAscend, true);
+
+ // 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')));
+}
|
|