From Jakub Zawadzki via bug 4273:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 28 May 2010 18:04:56 +0000 (18:04 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 28 May 2010 18:04:56 +0000 (18:04 +0000)
After appending new record set packet_list->columnized to FALSE.

From me:

Use g_ptr_array_sort_with_data instead of g_qsort_with_data in case the
GPtrArray internals ever change.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33011 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/packet_list_store.c

index 269dae14d342186408d88ec37911e9820cb9dbbf..426b75f7788af6974b2c941966ef8a362211e17e 100644 (file)
@@ -646,6 +646,11 @@ packet_list_append_record(PacketList *packet_list, frame_data *fdata)
 
        PACKET_LIST_RECORD_APPEND(packet_list->physical_rows, newrecord);
 
+       if (packet_list->columnized) {
+               /* XXX, dissect? */
+               packet_list->columnized = FALSE;
+       }
+
        /* 
         * Issue a row_inserted signal if the model is connected
         * and the row is vissible.
@@ -998,9 +1003,7 @@ packet_list_resort(PacketList *packet_list)
                return;
 
        /* resort physical rows according to sorting column */
-       g_qsort_with_data(packet_list->physical_rows->pdata,
-                         PACKET_LIST_RECORD_COUNT(packet_list->physical_rows),
-                         sizeof(PacketListRecord*),
+       g_ptr_array_sort_with_data(packet_list->physical_rows,
                          (GCompareDataFunc) packet_list_qsort_physical_compare_func,
                          packet_list);