forked from osmocom/wireshark
Qt: Show custom column fields in context menu
Show the custom column field name in the column context menu to improve usability when show/hide columns. The column title alone may not be sufficient to separate different columns. Change-Id: I52f249433b8090249af87725fa97eba302692918 Reviewed-on: https://code.wireshark.org/review/35088 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
parent
7da6109f3b
commit
9dbf684c71
|
@ -204,7 +204,11 @@ void PacketListHeader::contextMenuEvent(QContextMenuEvent *event)
|
|||
contextMenu->addSeparator();
|
||||
|
||||
for (int cnt = 0; cnt < prefs.num_cols; cnt++) {
|
||||
QAction *action = new QAction(get_column_title(cnt), this);
|
||||
QString title(get_column_title(cnt));
|
||||
if (get_column_format(cnt) == COL_CUSTOM) {
|
||||
title.append(QString("\t(%1)").arg(get_column_custom_fields(cnt)));
|
||||
}
|
||||
QAction *action = new QAction(title, this);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(get_column_visible(cnt));
|
||||
action->setData(QVariant::fromValue(cnt));
|
||||
|
|
Loading…
Reference in New Issue