summaryrefslogtreecommitdiff
path: root/ui/qt/byte_view_tab.cpp
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-03-30 23:49:06 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-03-31 07:29:12 +0000
commit4de738f5a720012afde1c9e38b1cbf1131fdee34 (patch)
treea7db9d691be590136e85c5aa274c7c4164008c6b /ui/qt/byte_view_tab.cpp
parentad097385c05c370440fb810e67f811398efc0ea0 (diff)
downloadwireshark-4de738f5a720012afde1c9e38b1cbf1131fdee34.tar.gz
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 <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'ui/qt/byte_view_tab.cpp')
-rw-r--r--ui/qt/byte_view_tab.cpp8
1 files changed, 6 insertions, 2 deletions
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?