mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
Fix SEGV when adding/deleting metadata fields
.. model header data updates need to trigger a reset of the views and internal state e.g. index of the calendar text and the headings_ string list.
This commit is contained in:
@@ -174,6 +174,7 @@ RideCacheModel::configChanged(qint32)
|
||||
// 5 bool isRun;
|
||||
|
||||
columns_ = 5 + factory->metricCount() + metadata.count();
|
||||
headings_.clear();
|
||||
|
||||
for (int section=0; section<columns_; section++) {
|
||||
|
||||
@@ -206,10 +207,10 @@ RideCacheModel::configChanged(qint32)
|
||||
}
|
||||
}
|
||||
|
||||
headerDataChanged (Qt::Horizontal, 0, columns_-1);
|
||||
|
||||
// all good
|
||||
endResetModel();
|
||||
|
||||
headerDataChanged (Qt::Horizontal, 0, columns_-1);
|
||||
}
|
||||
|
||||
// catch ridecache refreshes
|
||||
|
||||
Reference in New Issue
Block a user