summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-03-23 23:45:53 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-03-23 23:45:53 (GMT)
commitd07168a24ab39cad0e3cb69ed8c5e46c7a2dcdf3 (patch)
tree4b1233ff77cbfc8e0c66fd503c6a399060e32f2a /src/gui
parentceda50048870217cfa6de1ebad22f851d1259718 (diff)
Handled correctly the first move request from a view panel.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/editem.c14
1 files changed, 11 insertions, 3 deletions
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));
+
+ }
}