From 9417a6bc0bbc72d367c3ee84274a4eac1bf24a7e Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Thu, 16 Jan 2014 23:22:46 -0500 Subject: [PATCH 1/1] Fix error when toggling memory display viewing on/off Only the first two rows were displayed. The crc_init variable was not handled correctly. --- src/gtk/memwin.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gtk/memwin.c b/src/gtk/memwin.c index 56d728b..dae27a9 100644 --- a/src/gtk/memwin.c +++ b/src/gtk/memwin.c @@ -246,6 +246,8 @@ memwin_init(char *title, int memory_id) GtkWidget *scrollwin; GtkListStore *store; + log_debug("memwin_init"); + COL_ASCII = cfg->bytes_per_row + 1; N_COLUMNS = COL_ASCII + 1; @@ -305,9 +307,8 @@ memwin_row_changed(int memory_id, int row, unsigned int address) (crc_new == memwin_infos->crc[row])) { row_changed = false; } else { - memwin_infos->crc_init = true; memwin_infos->crc[row] = crc_new; - log_debug(" Row %02d value(s) change", row); + log_debug(" Row %02d value(s) change", row); row_changed = true; } @@ -322,6 +323,8 @@ memwin_refresh(int memory_id) unsigned int Address = 0; GtkListStore *store; + log_debug("memwin_refresh"); + memwin_infos_select(memory_id); store = GTK_LIST_STORE(gtk_tree_view_get_model( @@ -377,4 +380,7 @@ memwin_refresh(int memory_id) gtk_list_store_set(store, &iter, COL_ASCII, ascii_str, -1); } } + + /* At this point we know all rows crc have been initialized. */ + memwin_infos->crc_init = true; } -- 2.20.1