summaryrefslogtreecommitdiff
path: root/src/gtkext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-12-21 19:57:07 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-12-21 19:57:07 (GMT)
commitf6490769c12dbb3b7766c7e6861284b8fee9f9e6 (patch)
tree2536b536a800c5087022c78d4ea88c4d8d841c56 /src/gtkext
parent365246bd2d9dd9f7eea008b25b8550bba0aac1cc (diff)
Improved view switching.
Diffstat (limited to 'src/gtkext')
-rw-r--r--src/gtkext/gtkgraphdisplay.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/gtkext/gtkgraphdisplay.c b/src/gtkext/gtkgraphdisplay.c
index 4475c08..749a156 100644
--- a/src/gtkext/gtkgraphdisplay.c
+++ b/src/gtkext/gtkgraphdisplay.c
@@ -650,17 +650,20 @@ static void gtk_graph_display_prepare_for_cursor(GtkGraphDisplay *display, const
{
gtk_graph_display_reset(display, false);
+ if (!g_line_cursor_is_valid(cursor))
+ goto no_valid_cursor;
+
format = g_loaded_binary_get_format(GTK_DISPLAY_PANEL(display)->binary);
found = g_binary_format_find_symbol_for(G_BIN_FORMAT(format), &addr, &symbol);
if (!found)
- goto ggddma_done;
+ goto no_symbol_found;
type = g_binary_symbol_get_target_type(symbol);
if (type != STP_ROUTINE && type != STP_ENTRY_POINT)
- goto ggddma_bad_type;
+ goto bad_symbol_type;
display->routine = symbol;
g_object_ref(G_OBJECT(symbol));
@@ -694,6 +697,8 @@ static void gtk_graph_display_prepare_for_cursor(GtkGraphDisplay *display, const
gtk_graph_display_update_support_margins(display, &allocation);
+ gtk_widget_size_allocate(GTK_WIDGET(display), &allocation);
+
/**
* Première sélection...
*/
@@ -704,16 +709,20 @@ static void gtk_graph_display_prepare_for_cursor(GtkGraphDisplay *display, const
g_object_unref(G_OBJECT(child));
- ggddma_bad_type:
+ bad_symbol_type:
g_object_unref(G_OBJECT(symbol));
- ggddma_done:
+ no_symbol_found:
update_editor_items_current_view(G_LOADED_PANEL(display));
g_object_unref(G_OBJECT(format));
+ no_valid_cursor:
+
+ ;
+
}
}