diff --git a/src/blackgui/models/listmodelbase.cpp b/src/blackgui/models/listmodelbase.cpp index d93788f2d..e5fa8ef25 100644 --- a/src/blackgui/models/listmodelbase.cpp +++ b/src/blackgui/models/listmodelbase.cpp @@ -545,10 +545,11 @@ namespace BlackGui } // sort the values + const auto tieBreakersCopy = m_sortTieBreakers; //! \todo workaround T579 still not thread-safe, but less likely to crash const std::integral_constant marker {}; const auto p = [ = ](const ObjectType & a, const ObjectType & b) -> bool { - return Private::compareForModelSort(a, b, order, propertyIndex, m_sortTieBreakers, marker); + return Private::compareForModelSort(a, b, order, propertyIndex, tieBreakersCopy, marker); }; return container.sorted(p); diff --git a/src/blackgui/models/listmodelbasenontemplate.h b/src/blackgui/models/listmodelbasenontemplate.h index d7399c5f2..f40428ed5 100644 --- a/src/blackgui/models/listmodelbasenontemplate.h +++ b/src/blackgui/models/listmodelbasenontemplate.h @@ -165,7 +165,7 @@ namespace BlackGui CColumns m_columns; //!< columns metadata int m_sortColumn; //!< currently sorted column - bool m_modelDestroyed = false; //!< model is about to be destroyed + bool m_modelDestroyed = false; //!< \todo rudimentary workaround for T579, can be removed Qt::SortOrder m_sortOrder; //!< sort order (asc/desc) Qt::DropActions m_dropActions = Qt::IgnoreAction; //!< drop actions BlackMisc::CPropertyIndexList m_sortTieBreakers; //!< how column values are sorted if equal, if no value is given this is random