summaryrefslogtreecommitdiff
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
parentceda50048870217cfa6de1ebad22f851d1259718 (diff)
Handled correctly the first move request from a view panel.
-rw-r--r--ChangeLog5
-rw-r--r--src/gui/editem.c14
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5064b4d..234f547 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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));
+
+ }
}