Skip to content

Commit

Permalink
Merge pull request #35 from ChrisHal/fix_issue_34
Browse files Browse the repository at this point in the history
avoid trailing space in sweep item label, fixes issue #34
  • Loading branch information
ChrisHal authored Oct 24, 2023
2 parents 3eac61e + 2f18931 commit d1794df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions QtPMbrowser/pmbrowserwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ void PMbrowserWindow::populateTreeView()
auto seriesitem = new QTreeWidgetItem(grpitem, QStringList(label2));
seriesitem->setData(0, Qt::UserRole, QVariant::fromValue(&series));
for(auto& sweep : series.Children) {
QString label3 = QString("sweep %1").arg(sweep.extractInt32(SwSweepCount))
+" "+qs_from_sv(sweep.getString(SwLabel));
QString label3 = QString("sweep %1").arg(sweep.extractInt32(SwSweepCount));
auto sw_label = qs_from_sv(sweep.getString(SwLabel));
if (sw_label.length() > 0) {
label3 += ' ' + sw_label;
}
auto sweepitem = new QTreeWidgetItem(seriesitem, QStringList(label3));
sweepitem->setData(0, Qt::UserRole, QVariant::fromValue(&sweep));
for(auto& trace : sweep.Children) {
Expand Down

0 comments on commit d1794df

Please sign in to comment.