mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 19:11:39 -06:00
Fix problem with cursor navigation in table browser
This was causing that cursor navigation in table browser did not move the
scroll or that find bar required an additional scrollTo call.
Problem was introduced in 63aabb9601
See comments in PR #2013
This commit is contained in:
@@ -193,7 +193,7 @@ TableBrowser::TableBrowser(QWidget* parent) :
|
||||
clearAllCondFormats(column);
|
||||
});
|
||||
|
||||
connect(ui->dataTable, &ExtendedTableWidget::currentChanged, this, [this](const QModelIndex ¤t, const QModelIndex &) {
|
||||
connect(ui->dataTable, &ExtendedTableWidget::currentIndexChanged, this, [this](const QModelIndex ¤t, const QModelIndex &) {
|
||||
// Get cell current format for updating the format toolbar values. Block signals, so the format change is not reapplied.
|
||||
QFont font;
|
||||
font.fromString(m_browseTableModel->data(current, Qt::FontRole).toString());
|
||||
@@ -1389,10 +1389,9 @@ void TableBrowser::find(const QString& expr, bool forward, bool include_first)
|
||||
const auto match = m_browseTableModel->nextMatch(start, column_list, expr, flags, !forward, include_first);
|
||||
|
||||
// Select the next match if we found one
|
||||
if(match.isValid()) {
|
||||
if(match.isValid())
|
||||
ui->dataTable->setCurrentIndex(match);
|
||||
ui->dataTable->scrollTo(match);
|
||||
}
|
||||
|
||||
// Make the expression control red if no results were found
|
||||
if(match.isValid() || expr == "")
|
||||
ui->editFindExpression->setStyleSheet("");
|
||||
|
||||
Reference in New Issue
Block a user