mirror of https://github.com/GNOME/gimp.git
fixed the layers dialog's "New Layer" button by checking for a floating
2001-11-15 Michael Natterer <mitch@gimp.org> * app/gui/layers-commands.c: fixed the layers dialog's "New Layer" button by checking for a floating selection in layers_new_layer_query() instead of layers_new_layer_cmd_callback().
This commit is contained in:
parent
f901b46da6
commit
a39ba058d0
|
@ -1,3 +1,10 @@
|
|||
2001-11-15 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/gui/layers-commands.c: fixed the layers dialog's "New Layer"
|
||||
button by checking for a floating selection in
|
||||
layers_new_layer_query() instead of
|
||||
layers_new_layer_cmd_callback().
|
||||
|
||||
2001-11-15 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimpdrawtool.[ch]: restructured the new draw utility
|
||||
|
|
|
@ -181,27 +181,14 @@ layers_new_cmd_callback (GtkWidget *widget,
|
|||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *layer;
|
||||
|
||||
gimage = (GimpImage *) gimp_widget_get_callback_context (widget);
|
||||
|
||||
if (! gimage)
|
||||
return;
|
||||
|
||||
/* If there is a floating selection, the new command transforms
|
||||
* the current fs into a new layer
|
||||
*/
|
||||
if ((layer = gimp_image_floating_sel (gimage)))
|
||||
{
|
||||
floating_sel_to_layer (layer);
|
||||
|
||||
gdisplays_flush ();
|
||||
}
|
||||
else
|
||||
{
|
||||
layers_new_layer_query (gimage);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
layers_duplicate_cmd_callback (GtkWidget *widget,
|
||||
|
@ -567,6 +554,7 @@ void
|
|||
layers_new_layer_query (GimpImage *gimage)
|
||||
{
|
||||
NewLayerOptions *options;
|
||||
GimpLayer *floating_sel;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
|
@ -574,6 +562,19 @@ layers_new_layer_query (GimpImage *gimage)
|
|||
GtkWidget *spinbutton;
|
||||
GtkWidget *frame;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
|
||||
/* If there is a floating selection, the new command transforms
|
||||
* the current fs into a new layer
|
||||
*/
|
||||
if ((floating_sel = gimp_image_floating_sel (gimage)))
|
||||
{
|
||||
floating_sel_to_layer (floating_sel);
|
||||
|
||||
gdisplays_flush ();
|
||||
return;
|
||||
}
|
||||
|
||||
options = g_new0 (NewLayerOptions, 1);
|
||||
|
||||
options->fill_type = fill_type;
|
||||
|
|
|
@ -181,27 +181,14 @@ layers_new_cmd_callback (GtkWidget *widget,
|
|||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpLayer *layer;
|
||||
|
||||
gimage = (GimpImage *) gimp_widget_get_callback_context (widget);
|
||||
|
||||
if (! gimage)
|
||||
return;
|
||||
|
||||
/* If there is a floating selection, the new command transforms
|
||||
* the current fs into a new layer
|
||||
*/
|
||||
if ((layer = gimp_image_floating_sel (gimage)))
|
||||
{
|
||||
floating_sel_to_layer (layer);
|
||||
|
||||
gdisplays_flush ();
|
||||
}
|
||||
else
|
||||
{
|
||||
layers_new_layer_query (gimage);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
layers_duplicate_cmd_callback (GtkWidget *widget,
|
||||
|
@ -567,6 +554,7 @@ void
|
|||
layers_new_layer_query (GimpImage *gimage)
|
||||
{
|
||||
NewLayerOptions *options;
|
||||
GimpLayer *floating_sel;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
|
@ -574,6 +562,19 @@ layers_new_layer_query (GimpImage *gimage)
|
|||
GtkWidget *spinbutton;
|
||||
GtkWidget *frame;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
|
||||
/* If there is a floating selection, the new command transforms
|
||||
* the current fs into a new layer
|
||||
*/
|
||||
if ((floating_sel = gimp_image_floating_sel (gimage)))
|
||||
{
|
||||
floating_sel_to_layer (floating_sel);
|
||||
|
||||
gdisplays_flush ();
|
||||
return;
|
||||
}
|
||||
|
||||
options = g_new0 (NewLayerOptions, 1);
|
||||
|
||||
options->fill_type = fill_type;
|
||||
|
|
Loading…
Reference in New Issue