Index: ossp-pkg/as/as-gui/as_assist.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v rcsdiff -q -kk '-r1.20' '-r1.21' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v' 2>/dev/null --- as_assist.cpp 2002/11/26 17:23:51 1.20 +++ as_assist.cpp 2002/11/26 19:09:58 1.21 @@ -408,7 +408,7 @@ m_pMaintable->setNumCols(g_knCols); m_pMaintable->setReadOnly(true); // Table is read only m_pMaintable->setColumnMovingEnabled(false); // Ctrl-drag disabled - m_pMaintable->setSelectionMode(QTable::MultiRow); // Multi row selection + m_pMaintable->setSelectionMode(QTable::SingleRow); // Multi row selection m_pMaintable->setFocusStyle(QTable::FollowStyle); // How cells are drawn m_pMaintable->setLeftMargin(0); // Get rid of the vertical header m_pMaintable->verticalHeader()->hide(); // by hiding it with a margin of 0 Index: ossp-pkg/as/as-gui/as_slot.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v rcsdiff -q -kk '-r1.16' '-r1.17' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v' 2>/dev/null --- as_slot.cpp 2002/11/26 17:34:02 1.16 +++ as_slot.cpp 2002/11/26 19:09:58 1.17 @@ -13,7 +13,6 @@ #include "gfx/cwlogo.xpm" // static const char *s_kpcCwlogo_xpm[] #include "gfx/ossplogo.xpm" // static const char *s_kpcOssplogo_xpm[] - // // Cut an entry // @@ -46,9 +45,19 @@ // void Titraqform::addEntry(void) { - // Adds a new row to end of table and focuses to it - m_pMaintable->setNumRows(m_pMaintable->numRows() + 1); - m_pMaintable->setCurrentCell(m_pMaintable->numRows(), 0); +// // Add a row to end of table and focuses to it +// m_pMaintable->setNumRows(m_pMaintable->numRows() + 1); +// m_pMaintable->setCurrentCell(m_pMaintable->numRows(), 0); + + // Add a row after selection and focus to the new row + if (m_pMaintable->currentRow() + 1 != m_pMaintable->numRows()) { + m_pMaintable->insertRows(m_pMaintable->currentRow()); + m_pMaintable->setCurrentCell(m_pMaintable->currentRow() - 3, m_pMaintable->currentColumn()); + } + else // Special case to handle adding an only row or last row + m_pMaintable->insertRows(m_pMaintable->currentRow() + 1); { + m_pMaintable->setCurrentCell(m_pMaintable->currentRow() + 1, m_pMaintable->currentColumn()); + } } // @@ -56,8 +65,13 @@ // void Titraqform::delEntry(void) { - Prototype Unimp; - Unimp.doMbox(); + // Remove the row at selection and focus to the next row + if (m_pMaintable->currentRow() + 1 != m_pMaintable->numRows()) { + m_pMaintable->setCurrentCell(m_pMaintable->currentRow() + 1, m_pMaintable->currentColumn()); + m_pMaintable->removeRow(m_pMaintable->currentRow() - 1); + } + else // Special case to handle removing of only row or last row + m_pMaintable->removeRow(m_pMaintable->currentRow()); } //