OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_slot.cpp versions 1.141 and 1.142
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/as/as-gui/as_slot.cpp 1.141 -> 1.142

--- as_slot.cpp  2004/05/27 21:48:41     1.141
+++ as_slot.cpp  2004/08/12 16:23:26     1.142
@@ -168,6 +168,12 @@
         m_pMaintable->setDirty();   // Set data to dirty state
         m_pMaintable->setCurrentCell(Select.topRow(), m_pMaintable->currentColumn());
 
+        // According to Trolltech, insertRows() ''clears the selection(s)´´.
+        // They are pretty wrong about that, so unfortunately we'll have to
+        // take care of the dirty work ourselves with a clearSelection().
+        m_pMaintable->clearSelection(false);
+        m_pMaintable->selectRow(m_pMaintable->currentRow());
+
         // Update relevant data fields for all new rows
         for (int nIter = 0; nIter < nTotal; nIter++) {
             m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXSTATUS, QString(QChar('W')));
@@ -192,6 +198,12 @@
         m_pMaintable->setDirty();   // Set data to dirty state
         m_pMaintable->setCurrentCell(Select.bottomRow() + 1, m_pMaintable->currentColumn());
 
+        // According to Trolltech, insertRows() ''clears the selection(s)´´.
+        // They are pretty wrong about that, so unfortunately we'll have to
+        // take care of the dirty work ourselves with a clearSelection().
+        m_pMaintable->clearSelection(false);
+        m_pMaintable->selectRow(m_pMaintable->currentRow());
+
         // Update relevant data fields for all new rows
         for (int nIter = 1; nIter <= nTotal; nIter++) {
             m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXSTATUS, QString(QChar('W')));

CVSTrac 2.0.1