[gimp] app: don't call scale functions on an empty display shell
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't call scale functions on an empty display shell
- Date: Wed, 11 Aug 2010 22:32:51 +0000 (UTC)
commit 0985274e8ce34002e62a7ad56ba1c6e316028257
Author: Michael Natterer <mitch gimp org>
Date: Thu Aug 12 00:32:34 2010 +0200
app: don't call scale functions on an empty display shell
app/display/gimpnavigationeditor.c | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/app/display/gimpnavigationeditor.c b/app/display/gimpnavigationeditor.c
index 176ea97..314df74 100644
--- a/app/display/gimpnavigationeditor.c
+++ b/app/display/gimpnavigationeditor.c
@@ -518,11 +518,10 @@ gimp_navigation_editor_marker_changed (GimpNavigationView *view,
{
if (editor->shell)
{
- GimpDisplayShell *shell = editor->shell;
-
- gimp_display_shell_scroll_center_image_coordinate (shell,
- x + width / 2,
- y + height / 2);
+ if (gimp_display_get_image (editor->shell->display))
+ gimp_display_shell_scroll_center_image_coordinate (editor->shell,
+ x + width / 2,
+ y + height / 2);
}
}
@@ -535,10 +534,11 @@ gimp_navigation_editor_zoom (GimpNavigationView *view,
if (editor->shell)
{
- gimp_display_shell_scale (editor->shell,
- direction,
- 0.0,
- GIMP_ZOOM_FOCUS_BEST_GUESS);
+ if (gimp_display_get_image (editor->shell->display))
+ gimp_display_shell_scale (editor->shell,
+ direction,
+ 0.0,
+ GIMP_ZOOM_FOCUS_BEST_GUESS);
}
}
@@ -595,10 +595,11 @@ static void
gimp_navigation_editor_zoom_adj_changed (GtkAdjustment *adj,
GimpNavigationEditor *editor)
{
- gimp_display_shell_scale (editor->shell,
- GIMP_ZOOM_TO,
- pow (2.0, gtk_adjustment_get_value (adj)),
- GIMP_ZOOM_FOCUS_BEST_GUESS);
+ if (gimp_display_get_image (editor->shell->display))
+ gimp_display_shell_scale (editor->shell,
+ GIMP_ZOOM_TO,
+ pow (2.0, gtk_adjustment_get_value (adj)),
+ GIMP_ZOOM_FOCUS_BEST_GUESS);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]