[baobab] Fix "Zoom out" item sensitivity for treemap chart



commit f192f06272f6dfe38cdda5c93098dc0fc23ea7e2
Author: Ondrej Holy <oholy redhat com>
Date:   Wed Jun 24 14:46:17 2015 +0200

    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 files 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
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]