Blob Blame History Raw
From c017dcf93d09b88a8896e610b95a1f956cad37c1 Mon Sep 17 00:00:00 2001
From: Ondrej Holy <oholy@redhat.com>
Date: Wed, 24 Jun 2015 14:46:17 +0200
Subject: [PATCH] Fix "Zoom out" item sensitivity for treemap chart

can_zoom_out() returns TRUE if more visible children items are
available regardless of MAX_DEPTH. This patch change can_zoom_out()
behavior to return FALSE if MAX_DEPTH is reached.

https://bugzilla.gnome.org/show_bug.cgi?id=751436
---
 src/baobab-treemap.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/baobab-treemap.vala b/src/baobab-treemap.vala
index 68316b7..f134424 100644
--- a/src/baobab-treemap.vala
+++ b/src/baobab-treemap.vala
@@ -190,11 +190,11 @@ namespace Baobab {
         }
 
         protected override bool can_zoom_out () {
-            return more_visible_children;
+            return (max_depth < MAX_DEPTH) && more_visible_children;
         }
 
         protected override bool can_zoom_in () {
             return (max_visible_depth > 1);
         }
     }
-}
\ No newline at end of file
+}
-- 
2.4.4