Qt: fix saving exported objects after sorting columns
authorMoshe Kaplan <me@moshekaplan.com>
Fri, 26 Oct 2018 00:54:51 +0000 (20:54 -0400)
committerPeter Wu <peter@lekensteyn.nl>
Fri, 26 Oct 2018 09:39:08 +0000 (09:39 +0000)
commit4a2739ec88dff4c580ba51508a4cf3944718d09d
tree18eb623bd3b44ddb58b31720dcffa4a5488e440b
parentda8e69e158c2da4da79b110aa713fef2c7e9e6ce
Qt: fix saving exported objects after sorting columns

Avoid assuming an export object's row number is consistent throughout,
because the row number can change if the display is filtered or sorted.
Instead, look up the index in the model with mapToSource().

Bug: 14545
Change-Id: I61099dfb4f3abc056417eb7d6ffbc7a988553dd8
Reviewed-on: https://code.wireshark.org/review/30388
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
ui/qt/export_object_dialog.cpp