Book Options did not raise when already open

If you open File->Properties and the dialogue gets hidden and you go to
open it again the existing dialogue was not being raised to the front.
This was due to a bad cast.
This commit is contained in:
Robert Fewell 2018-08-24 16:52:17 +01:00
parent 3456596a1c
commit 8ad6e04549

View File

@ -4098,10 +4098,15 @@ static gboolean
show_handler (const char *class_name, gint component_id, show_handler (const char *class_name, gint component_id,
gpointer user_data, gpointer iter_data) gpointer user_data, gpointer iter_data)
{ {
GtkWidget *dialog; GNCOptionWin *optwin = user_data;
GtkWidget *widget;
dialog = GTK_WIDGET(user_data); if (!optwin)
gtk_window_present(GTK_WINDOW(dialog)); return(FALSE);
widget = gnc_options_dialog_widget(optwin);
gtk_window_present(GTK_WINDOW(widget));
return(TRUE); return(TRUE);
} }