OSSP CVS Repository

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

ossp-pkg/as/as-gui/as_table.cpp 1.10 -> 1.11

--- as_table.cpp 2002/12/13 17:44:42     1.10
+++ as_table.cpp 2002/12/13 18:06:10     1.11
@@ -46,7 +46,9 @@
     else if (pEvent->type() == QEvent::KeyPress) {
         if (((QKeyEvent *)pEvent)->key() == Qt::Key_Tab) { // Handle tab key
             if (this->getEdition() >= 0) {
-                int nColadvance = ((currentColumn() + 1) % TITRAQ_IDXTAIL);
+                int nIter = 0; // To skip invisible columns
+                while (columnWidth((currentColumn() + ++nIter) % TITRAQ_IDXTAIL) <= 0); // Skip invisibles
+                int nColadvance = ((currentColumn() + nIter) % TITRAQ_IDXTAIL);
                 if (nColadvance == 0)   // Advance the column and possibly the row too
                     this->setCurrentCell(currentRow() + 1, nColadvance);
                 else
@@ -60,7 +62,9 @@
         }
         else if (((QKeyEvent *)pEvent)->key() == Qt::Key_Backtab) { // Handle shift tab key
             if (this->getEdition() >= 0) {
-                int nColadvance = ((currentColumn() - 1) % TITRAQ_IDXTAIL);
+                int nIter = 0; // To skip invisible columns
+                while (columnWidth((currentColumn() - ++nIter) % TITRAQ_IDXTAIL) <= 0); // Skip invisibles
+                int nColadvance = ((currentColumn() - nIter) % TITRAQ_IDXTAIL);
                 if (nColadvance == 0)   // Advance the column and possibly the row too
                     this->setCurrentCell(currentRow() - 1, nColadvance);
                 else

CVSTrac 2.0.1