File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,8 +189,9 @@ ColumnCache::ColumnCache() {
189189 m_pKeyNotationCP = new ControlProxy (mixxx::library::prefs::kKeyNotationConfigKey , this );
190190 m_pKeyNotationCP->connectValueChanged (this , &ColumnCache::slotSetKeySortOrder);
191191
192+ // Used in BaseTrackTableModel() along with a later setColumns() call.
192193 // ColumnCache is initialized before the preferences, so slotSetKeySortOrder is called
193- // for again if DlgPrefKey sets the [Library]. key_notation CO to a value other than
194+ // again if DlgPrefKey sets the [Library]. key_notation CO to a value other than
194195 // KeyUtils::CUSTOM as Mixxx is starting.
195196}
196197
@@ -240,6 +241,10 @@ void ColumnCache::setColumns(QStringList columns) {
240241}
241242
242243void ColumnCache::slotSetKeySortOrder (double notationValue) {
244+ if (m_columnsByIndex.isEmpty ()) {
245+ // we are not caching columns yet
246+ return ;
247+ }
243248 const int keyColumnIndex = m_columnIndexByEnum[COLUMN_LIBRARYTABLE_KEY ];
244249 if (keyColumnIndex < 0 ) {
245250 return ;
You can’t perform that action at this time.
0 commit comments