fix problem where menus_activate_callback() causes tool options dialog to

appear empty by destroying the active tool.
  rayl@netrover.com
This commit is contained in:
People doing a 16 bpc version of gimp 1997-12-15 03:18:13 +00:00
parent de664224b9
commit e8f7ed532c
3 changed files with 21 additions and 1 deletions

View File

@ -1,4 +1,8 @@
Sun Dec 14 20:57:46 1997 Ray Lehtiniemi <rayl@localhost>
Sun Dec 14 20:57:46 1997 Ray Lehtiniemi <rayl@netrover.com>
* app/tools.c (tools_options_dialog_show): fix a problem where
the tools options dialog will appear empty because the
active tool was destroyed by menus_activate_callback().
* app/blend.c fixed cores when using custom gradients with
offset of 100

View File

@ -401,6 +401,13 @@ tools_options_dialog_new ()
void
tools_options_dialog_show ()
{
/* menus_activate_callback() will destroy the active tool in many
cases. if the user tries to bring up the options before
switching tools, the dialog will be empty. recreate the active
tool here if necessary to avoid this behavior */
if (!active_tool)
active_tool_control (RECREATE, gdisplay_active());
if (!GTK_WIDGET_VISIBLE(options_shell))
{
gtk_widget_show (options_shell);
@ -499,6 +506,7 @@ active_tool_control (int action,
break;
case DESTROY :
active_tool_free();
gtk_widget_hide (options_shell);
break;
}
}

View File

@ -401,6 +401,13 @@ tools_options_dialog_new ()
void
tools_options_dialog_show ()
{
/* menus_activate_callback() will destroy the active tool in many
cases. if the user tries to bring up the options before
switching tools, the dialog will be empty. recreate the active
tool here if necessary to avoid this behavior */
if (!active_tool)
active_tool_control (RECREATE, gdisplay_active());
if (!GTK_WIDGET_VISIBLE(options_shell))
{
gtk_widget_show (options_shell);
@ -499,6 +506,7 @@ active_tool_control (int action,
break;
case DESTROY :
active_tool_free();
gtk_widget_hide (options_shell);
break;
}
}