mirror of https://github.com/GNOME/gimp.git
Issue #2667 - When copying a text layer, paste should create a new...
...text layer, not an image of the text In gimp_edit_paste_get_layer(), when pasting as floating selection, collapse the pasted layer into an ordinary layer only if it's a group layer. There is nothing that speaks against having a floating text layer, it works just fine.
This commit is contained in:
parent
d873290915
commit
8a4aacb52f
|
@ -30,11 +30,11 @@
|
|||
#include "gimp-edit.h"
|
||||
#include "gimpbuffer.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpgrouplayer.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-duplicate.h"
|
||||
#include "gimpimage-new.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-selection.h"
|
||||
#include "gimplayer-new.h"
|
||||
#include "gimplist.h"
|
||||
|
@ -249,11 +249,15 @@ gimp_edit_paste_get_layer (GimpImage *image,
|
|||
case GIMP_PASTE_TYPE_FLOATING_IN_PLACE:
|
||||
case GIMP_PASTE_TYPE_FLOATING_INTO:
|
||||
case GIMP_PASTE_TYPE_FLOATING_INTO_IN_PLACE:
|
||||
/* when pasting as floating selection, force creation of a
|
||||
* plain layer, so gimp_item_convert() will collapse a
|
||||
* group layer
|
||||
/* when pasting as floating make sure gimp_item_convert()
|
||||
* will turn group layers into normal layers, otherwise use
|
||||
* the same layer type so e.g. text information gets
|
||||
* preserved. See issue #2667.
|
||||
*/
|
||||
layer_type = GIMP_TYPE_LAYER;
|
||||
if (GIMP_IS_GROUP_LAYER (layer))
|
||||
layer_type = GIMP_TYPE_LAYER;
|
||||
else
|
||||
layer_type = G_TYPE_FROM_INSTANCE (layer);
|
||||
break;
|
||||
|
||||
case GIMP_PASTE_TYPE_NEW_LAYER:
|
||||
|
|
Loading…
Reference in New Issue