diff --git a/app/mon/mon_plugins/signals_plotting/src/signal_tree_model.cpp b/app/mon/mon_plugins/signals_plotting/src/signal_tree_model.cpp index 523ae596aa..2bcdf4b97a 100644 --- a/app/mon/mon_plugins/signals_plotting/src/signal_tree_model.cpp +++ b/app/mon/mon_plugins/signals_plotting/src/signal_tree_model.cpp @@ -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)