From 2d2a2181a324a44a777b00705dfac476357e57f2 Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Thu, 11 Apr 2024 02:18:26 +0200 Subject: [PATCH] Fix sorting by symbol load status Thanks to @mobile46 for finding the issue in #3313 --- src/gui/Src/Gui/SymbolView.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gui/Src/Gui/SymbolView.cpp b/src/gui/Src/Gui/SymbolView.cpp index ac14f0a4..233f5f0c 100644 --- a/src/gui/Src/Gui/SymbolView.cpp +++ b/src/gui/Src/Gui/SymbolView.cpp @@ -80,6 +80,19 @@ public: } } + void sortRows(duint column, bool ascending) override + { + // HACK: when sorting by status, forcefully fill in the text so the sorting works + if(column == ColStatus) + { + for(duint row = 0; row < mData.size(); row++) + { + mData[row][column].text = getCellContent(row, column); + } + } + StdIconTable::sortRows(column, ascending); + } + private: MODULESYMBOLSTATUS getStatus(duint r) {