diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-05-04 13:46:02 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2016-05-05 15:46:45 +0000 |
commit | a748eac8087a6b0d198638c04a6527a1ac0aaa06 (patch) | |
tree | 5d806b5694b5be236fefe0bfba73e0e02f5fbc97 /ui | |
parent | a6a8745bea720727f0aae0acb269dfe3d674305f (diff) |
Qt: Make sure we redraw the far overlay.
Make sure we redraw the far overlay image when we unmark all packets.
Change-Id: Ib94af9029ee5c0a8e29a27c3b8aa8c84608fb9f6
Reviewed-on: https://code.wireshark.org/review/15266
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/packet_list.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index f0400df51a..64466f8987 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -1528,6 +1528,7 @@ void PacketList::drawFarOverlay() int o_height = groove_size.height(); int pl_rows = packet_list_model_->rowCount(); QImage overlay(o_width, o_height, QImage::Format_ARGB32_Premultiplied); + bool have_marked_image = false; // If only there were references from popular culture about getting into // some sort of groove. @@ -1543,7 +1544,6 @@ void PacketList::drawFarOverlay() tick_color.setAlphaF(0.3); painter.setPen(tick_color); - bool have_far = false; for (int row = 0; row < pl_rows; row++) { frame_data *fdata = packet_list_model_->getRowFdata(row); @@ -1556,15 +1556,17 @@ void PacketList::drawFarOverlay() int x2 = fdata->flags.ref_time ? o_width - 1 : tick_width; painter.drawLine(x1, new_line, x2, new_line); - have_far = true; + have_marked_image = true; } } - if (have_far) { + if (have_marked_image) { overlay_sb_->setMarkedPacketImage(overlay); return; } - } else { + } + + if (!have_marked_image) { QImage null_overlay; overlay_sb_->setMarkedPacketImage(null_overlay); } |