Qt: Resize columns to contents in DecodeAs
If user first time run DecodeAs columns width are not enough, so content are trimmed. Do resizing whenever add new item. Change-Id: I378e2a5b2134479d961f3f00d398d8052f7e556d Reviewed-on: https://code.wireshark.org/review/13392 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
This commit is contained in:
parent
846f08b97e
commit
0dbe79c53f
|
@ -361,6 +361,12 @@ void DecodeAsDialog::addRecord(bool copy_from_current)
|
|||
}
|
||||
|
||||
activateLastItem();
|
||||
|
||||
if (ui->decodeAsTreeWidget->topLevelItemCount() > 0) {
|
||||
for (int i = 0; i < ui->decodeAsTreeWidget->columnCount(); i++) {
|
||||
ui->decodeAsTreeWidget->resizeColumnToContents(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DecodeAsDialog::fillTypeColumn(QTreeWidgetItem *item)
|
||||
|
|
Loading…
Reference in New Issue