From 585ecc9143d46a118ee86b85259fdc95d04bf505 Mon Sep 17 00:00:00 2001
From: Nathan Haug <nate@lullabot.com>
Date: Mon, 17 Mar 2014 19:04:44 -0700
Subject: [PATCH] Issue #2203369 by stella: Disabled chart add-on displays
 still attempted to be attached.

---
 views/charts_plugin_style_chart.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/views/charts_plugin_style_chart.inc b/views/charts_plugin_style_chart.inc
index 5ebed29..547e4ee 100644
--- a/views/charts_plugin_style_chart.inc
+++ b/views/charts_plugin_style_chart.inc
@@ -326,7 +326,8 @@ class charts_plugin_style_chart extends views_plugin_style {
   function get_children_chart_displays() {
     $children_displays = array();
     foreach ($this->view->display as $display_name => $display) {
-      if ($display->display_plugin === 'chart' && $display->display_options['parent_display'] && empty($display->deleted)) {
+      $display_enabled = $this->view->display[$display_name]->handler->get_option('enabled');
+      if ($display->display_plugin === 'chart' && $display->display_options['parent_display'] && empty($display->deleted) && $display_enabled) {
         $parent_display_name = $display->display_options['parent_display'];
         if ($parent_display_name === $this->view->current_display) {
           $children_displays[$display_name] = $this->view->display[$display_name];
-- 
GitLab