Wireshark-commits: [Wireshark-commits] master-2.0 41bf1dd: Qt: Use correct column width when switch
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 26 Nov 2015 17:17:20 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=41bf1dda4f59adbffd3a6abfb7189adc93b06e39
Submitter: Stig Bj?rlykke (stig@xxxxxxxxxxxxx)
Changed: branch: master-2.0
Repository: wireshark

Commits:

41bf1dd by Stig Bjørlykke (stig@xxxxxxxxxxxxx):

    Qt: Use correct column width when switching profile
    
    QTreeView::setColumnHidden() saves column width on hide and restores
    column width on show.  When switching from a profile with hidden
    columns to a profile where this columns are shown we get a
    sectionResized() signal with the saved width from the old profile,
    initiated from columnsChanged() -> setColumnVisibility().
    We must avoid setting this as a new column width because this is
    recent values from a old column layout.
    
    In other cases we use setColumnVisibility() we don’t need to set
    a new column width either, because we store the column width ourself.
    
    Don't store column width when hiding column (new_width == 0).
    Restore column width when showing column because profiles may have
    changed the packet_list layout.
    
    Change-Id: I7e89c3477402ec6d621cd2015ee74b086f60d6cb
    Reviewed-on: https://code.wireshark.org/review/12111
    Petri-Dish: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    (cherry picked from commit 4980d505f268b2b1d2ebabf815f3d0ce34e8cd71)
    Reviewed-on: https://code.wireshark.org/review/12192
    

Actions performed:

    from  b6a0392   Lua: Switch URL to documentation to HTTPS
    adds  41bf1dd   Qt: Use correct column width when switching profile


Summary of changes:
 ui/qt/packet_list.cpp |   24 ++++++++++++++++++++----
 ui/qt/packet_list.h   |    1 +
 2 files changed, 21 insertions(+), 4 deletions(-)