changeset 403:dc32f6e7839b

* minor enhancement to data edit make-current
author Chris Cannam
date Wed, 18 Jun 2008 14:34:13 +0000
parents 66e01a6c9554
children 4075bf03faef
files widgets/ModelDataTableDialog.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/widgets/ModelDataTableDialog.cpp	Tue Jun 17 16:24:50 2008 +0000
+++ b/widgets/ModelDataTableDialog.cpp	Wed Jun 18 14:34:13 2008 +0000
@@ -166,10 +166,13 @@
     //!!! should not do any of this if an item in the given row is
     //already current; should not scroll if the current row is already
     //visible
+    std::cerr << "rh = " << rh << ", row = " << row << ", scrolling to "
+              << topRow << std::endl;
     m_tableView->scrollTo
         (m_table->getModelIndexForRow(topRow));
     m_tableView->selectionModel()->setCurrentIndex
-        (m_table->getModelIndexForRow(row), QItemSelectionModel::Select);
+        (m_table->getModelIndexForRow(row),
+         QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
 }
 
 void