Skip to content

Commit

Permalink
Fix ride list focus on data change
Browse files Browse the repository at this point in the history
.. whenever ride data is changed, metadata, ride data etc then shortly
   after making the change the ride list would lose focus and lose
   the current selection

.. this was caused by reseetting the ride list model when data changed.
   this was unneccessary and also time consuming.

.. it took 3 hours of debugging to comment out 1 offending line, I think
   that might be a record !
  • Loading branch information
liversedge committed Feb 26, 2017
1 parent 234fcf5 commit 8b01c44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Gui/RideNavigatorProxy.h
Expand Up @@ -631,7 +631,7 @@ class SearchFilter : public QSortFilterProxyModel

// make sure changes are propogated upstream
connect(model, SIGNAL(modelReset()), this, SIGNAL(modelReset()));
connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SIGNAL(modelReset()));
//connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SIGNAL(modelReset()));
connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SIGNAL(modelReset()));
connect(model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), this, SIGNAL(modelReset()));
connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SIGNAL(modelReset()));
Expand Down

0 comments on commit 8b01c44

Please sign in to comment.