ossp-pkg/as/as-gui/as_slot.cpp 1.37 -> 1.38
--- as_slot.cpp 2002/12/04 21:03:16 1.37
+++ as_slot.cpp 2002/12/04 21:31:26 1.38
@@ -125,13 +125,21 @@
//
void Titraqform::delEntry(void)
{
+ QTableSelection Select = m_pMaintable->selection(0); // Highlighted text
+ int nTotal = Select.bottomRow() - Select.topRow() + 1; // Total row select
+ QMemArray<int> Rowselect(nTotal); // Row array
+
+ // Calculate rows to delete from selection highlight
+ for (int nIter = 0; nIter < nTotal; ++nIter)
+ Rowselect[nIter] = Select.topRow() + nIter;
+
// 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);
+ m_pMaintable->removeRows(Rowselect);
}
else // Special case to handle removing of only row or last row
- m_pMaintable->removeRow(m_pMaintable->currentRow());
+ m_pMaintable->removeRows(Rowselect);
}
//
|
|