Skip to content

Commit

Permalink
display multline strings in probe windows properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Špirk authored and fvacek committed Oct 19, 2024
1 parent b982ae3 commit 80671b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libshvvisu/src/timeline/channelprobewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,15 @@ void ChannelProbeWidget::loadValues()
ui->twData->setItem(ix, DataTableColumn::ColProperty, item);
ui->twData->hideColumn(DataTableColumn::ColProperty);

item = new QTableWidgetItem(pv.toString());
QString s = pv.toString();
if (s.endsWith('\n')) {
s.chop(1);
}
item = new QTableWidgetItem(s);
item->setFlags(item->flags() & ~Qt::ItemIsEditable);
ui->twData->setItem(ix, DataTableColumn::ColValue, item);
}
ui->twData->verticalHeader()->resizeSections(QHeaderView::ResizeMode::ResizeToContents);
}

ChannelProbeWidget::FrameSection ChannelProbeWidget::getFrameSection()
Expand Down

0 comments on commit 80671b4

Please sign in to comment.