diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-03-23 23:45:53 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-03-23 23:45:53 (GMT) |
commit | d07168a24ab39cad0e3cb69ed8c5e46c7a2dcdf3 (patch) | |
tree | 4b1233ff77cbfc8e0c66fd503c6a399060e32f2a | |
parent | ceda50048870217cfa6de1ebad22f851d1259718 (diff) |
Handled correctly the first move request from a view panel.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/gui/editem.c | 14 |
2 files changed, 16 insertions, 3 deletions
@@ -1,3 +1,8 @@ +16-03-24 Cyrille Bagard <nocbos@gmail.com> + + * src/gui/editem.c: + Handle correctly the first move request from a view panel. + 16-03-17 Cyrille Bagard <nocbos@gmail.com> * tools/d2c/grammar.y: diff --git a/src/gui/editem.c b/src/gui/editem.c index c4295b6..5f326ce 100644 --- a/src/gui/editem.c +++ b/src/gui/editem.c @@ -319,10 +319,18 @@ static void start_moving_to_address_in_view_panel(GtkViewPanel *vpanel, const vm src = gtk_view_panel_get_caret_location(vpanel); - move = g_db_move_new(src, addr); + /* S'il n'y a pas de passif, pas besoin d'historique */ + if (src == NULL) + gtk_view_panel_scroll_to_address(vpanel, addr, SPT_CENTER); - binary = gtk_view_panel_get_binary(vpanel); - g_loaded_binary_add_to_collection(binary, DBF_MOVES, G_DB_ITEM(move)); + else + { + move = g_db_move_new(src, addr); + + binary = gtk_view_panel_get_binary(vpanel); + g_loaded_binary_add_to_collection(binary, DBF_MOVES, G_DB_ITEM(move)); + + } } |