sort signals in dbc editor by start bit

This commit is contained in:
Leopixelo
2026-06-08 15:13:12 +02:00
parent cae3ec29ea
commit d24738eb7c
2 changed files with 15 additions and 1 deletions
+14
View File
@@ -18,6 +18,20 @@ namespace Ui {
class DBCMainEditor;
}
class QTreeWidgetSignalItem : public QTreeWidgetItem
{
public:
using QTreeWidgetItem::QTreeWidgetItem;
// DBCSignalHandler::getSignalsAsList returns a list sorted by start bit
// becuase C++ uses a stable sorting algorithm (also for sorting QTreeWidgetItems) the order is not changed if the comparison function always returns false
bool operator<(const QTreeWidgetItem &other) const override
{
Q_UNUSED(other);
return false;
}
};
enum DBCItemTypes
{
NODE = 1,