Applied slightly modified patch from Sven. When the quickmask has a

2004-03-20  Simon Budig  <simon@gimp.org>

	* app/core/gimpimage-qmask.c: Applied slightly modified patch
	from Sven. When the quickmask has a floating selection, anchor
	it before loading the selection and deleting the qmask channel.

	Fixes bug #137170.
This commit is contained in:
Simon Budig 2004-03-20 16:43:29 +00:00 committed by Simon Budig
parent 63177de7c4
commit 9d616282c3
3 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2004-03-20 Simon Budig <simon@gimp.org>
* app/core/gimpimage-qmask.c: Applied slightly modified patch
from Sven. When the quickmask has a floating selection, anchor
it before loading the selection and deleting the qmask channel.
Fixes bug #137170.
2004-03-20 Simon Budig <simon@gimp.org>
* app/gui/select-commands.[ch]: new callbacks to convert the
@ -5,6 +13,8 @@
* app/gui/image-menu.c: hook it into the menu. Default shortcut
is Shift+V.
Fixes bug #137754.
2004-03-20 Sven Neumann <sven@gimp.org>

View File

@ -30,6 +30,7 @@
#include "gimpimage-qmask.h"
#include "gimpimage-undo.h"
#include "gimpimage-undo-push.h"
#include "gimplayer.h"
#include "gimplayer-floating-sel.h"
#include "gimpselection.h"
@ -110,12 +111,17 @@ gimp_image_set_qmask_state (GimpImage *gimage,
{
if (mask)
{
GimpLayer *floating_sel = gimp_image_floating_sel (gimage);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_QMASK,
_("Disable QuickMask"));
if (gimage->qmask_inverted)
gimp_channel_invert (mask, TRUE);
if (floating_sel && floating_sel->fs.drawable == GIMP_DRAWABLE (mask))
floating_sel_anchor (floating_sel);
gimp_selection_load (gimp_image_get_mask (gimage), mask);
gimp_image_remove_channel (gimage, mask);

View File

@ -30,6 +30,7 @@
#include "gimpimage-qmask.h"
#include "gimpimage-undo.h"
#include "gimpimage-undo-push.h"
#include "gimplayer.h"
#include "gimplayer-floating-sel.h"
#include "gimpselection.h"
@ -110,12 +111,17 @@ gimp_image_set_qmask_state (GimpImage *gimage,
{
if (mask)
{
GimpLayer *floating_sel = gimp_image_floating_sel (gimage);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_QMASK,
_("Disable QuickMask"));
if (gimage->qmask_inverted)
gimp_channel_invert (mask, TRUE);
if (floating_sel && floating_sel->fs.drawable == GIMP_DRAWABLE (mask))
floating_sel_anchor (floating_sel);
gimp_selection_load (gimp_image_get_mask (gimage), mask);
gimp_image_remove_channel (gimage, mask);