[gimp/gimp-2-8] app: view_close_cmd_callback(): don't forbid to close images without layers
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] app: view_close_cmd_callback(): don't forbid to close images without layers
- Date: Wed, 3 Jul 2013 07:27:55 +0000 (UTC)
commit 92e9de96ae5e8a8b1ba917db35aaa281c333c058
Author: Michael Natterer <mitch gimp org>
Date: Wed Jul 3 09:26:03 2013 +0200
app: view_close_cmd_callback(): don't forbid to close images without layers
Also no need to check for shell != NULL.
app/actions/view-commands.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/app/actions/view-commands.c b/app/actions/view-commands.c
index ccbc3bd..bc8791f 100644
--- a/app/actions/view-commands.c
+++ b/app/actions/view-commands.c
@@ -100,15 +100,13 @@ view_close_cmd_callback (GtkAction *action,
GimpDisplay *display;
GimpDisplayShell *shell;
GimpImage *image;
-
return_if_no_display (display, data);
- shell = gimp_display_get_shell(display);
+
+ shell = gimp_display_get_shell (display);
image = gimp_display_get_image (display);
- /* Check for active image so we don't close the last display. */
- if (! GIMP_IS_IMAGE (image) || ! gimp_image_get_active_drawable (image))
- return;
- if (shell)
+ /* Check for the image so we don't close the last display. */
+ if (image)
gimp_display_shell_close (shell, FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]