Skip to content

Commit

Permalink
Mon GUI: Fixed Column labels in signal plotting widget (#1326)
Browse files Browse the repository at this point in the history
"Number" and "Rule" were mixed up, before
  • Loading branch information
FlorianReimold authored and KerstinKeller committed Jan 25, 2024
1 parent e84406c commit 353529a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions app/mon/mon_plugins/signals_plotting/src/signal_tree_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,16 @@ Qt::ItemFlags SignalTreeModel::flags(const QModelIndex& index) const
QVariant SignalTreeModel::data(const QModelIndex& index, int role) const
{
QAbstractTreeItem* tree_item = item(index);
if (tree_item)
return (index.column() >= 0 ? tree_item->data(index.column(), (Qt::ItemDataRole)role) : QVariant());
else
return QVariant();
if (tree_item != nullptr)
{
int const item_column = mapColumnToItem(index.column(), tree_item->type());
if (item_column >= 0)
{
return tree_item->data(item_column, (Qt::ItemDataRole)role);
}
}

return QVariant();
}

void SignalTreeModel::setCheckedState(SignalTreeItem* item, int index_column)
Expand Down

0 comments on commit 353529a

Please sign in to comment.