From 4de738f5a720012afde1c9e38b1cbf1131fdee34 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Wed, 30 Mar 2016 23:49:06 +0200 Subject: Fix byte pane not showing up in Packet dialog When a packet dialog is being constructed, the layout is apparently not fixed yet and the byte view is technically not visible. Fix the hidden byte pane by not hiding it when it is not (yet) visible. Bug: 11760 Change-Id: I0494fa16a5ed89ff31f934ba682a6bb884cc0e2e Reviewed-on: https://code.wireshark.org/review/14713 Reviewed-by: Peter Wu Petri-Dish: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte --- ui/qt/byte_view_tab.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ui/qt') diff --git a/ui/qt/byte_view_tab.cpp b/ui/qt/byte_view_tab.cpp index cf405081a4..9d21e70cbf 100644 --- a/ui/qt/byte_view_tab.cpp +++ b/ui/qt/byte_view_tab.cpp @@ -58,12 +58,16 @@ void ByteViewTab::addTab(const char *name, tvbuff_t *tvb, proto_tree *tree, QTre void ByteViewTab::clear() { bool visible = isVisible(); - hide(); + if (visible) { + hide(); + } while (currentWidget()) { delete currentWidget(); } addTab(); - setVisible(visible); + if (visible) { + show(); + } } // XXX How many hex dump routines do we have? -- cgit v1.2.3