comparison widgets/ModelDataTableDialog.cpp @ 405:7920688d8e70

* Fix two problems reported by Matthias in the data editor window: - highlighted row was incorrect (it was highlighting the row for the next item after the current position, not the one before it as it should be) - making a row current moved the centre frame of the view, but did not change the playback position as it should do
author Chris Cannam
date Thu, 26 Jun 2008 12:41:23 +0000
parents 4075bf03faef
children feeb48f7478a
comparison
equal deleted inserted replaced
404:4075bf03faef 405:7920688d8e70
176 176
177 // should only scroll if the desired row is not currently visible 177 // should only scroll if the desired row is not currently visible
178 178
179 // should only select if no part of the desired row is currently selected 179 // should only select if no part of the desired row is currently selected
180 180
181 std::cerr << "rh = " << rh << ", row = " << row << ", scrolling to " 181 // std::cerr << "rh = " << rh << ", row = " << row << ", scrolling to "
182 << topRow << std::endl; 182 // << topRow << std::endl;
183 183
184 int pos = m_tableView->rowViewportPosition(row); 184 int pos = m_tableView->rowViewportPosition(row);
185 185
186 if (pos < 0 || pos >= m_tableView->height() - rh) { 186 if (pos < 0 || pos >= m_tableView->height() - rh) {
187 m_tableView->scrollTo(m_table->index(topRow, 0)); 187 m_tableView->scrollTo(m_table->index(topRow, 0));