From 4c65bae9a77105539d78befd2d0bf9703eb36227 Mon Sep 17 00:00:00 2001 From: Aaron Ayres Date: Thu, 15 Apr 2021 11:26:39 -0700 Subject: [PATCH] remove all uses of use_draw_order --- chaco/axis.py | 2 +- chaco/base_plot_container.py | 14 -------------- chaco/grid.py | 2 +- chaco/plot_component.py | 14 -------------- 4 files changed, 2 insertions(+), 30 deletions(-) diff --git a/chaco/axis.py b/chaco/axis.py index 3d4b43936..1b4042494 100644 --- a/chaco/axis.py +++ b/chaco/axis.py @@ -232,7 +232,7 @@ def _do_layout(self, *args, **kw): Overrides Component. """ - if self.use_draw_order and self.component is not None: + if self.component is not None: self._layout_as_overlay(*args, **kw) else: super(PlotAxis, self)._do_layout(*args, **kw) diff --git a/chaco/base_plot_container.py b/chaco/base_plot_container.py index da14afe1d..21e95cb07 100644 --- a/chaco/base_plot_container.py +++ b/chaco/base_plot_container.py @@ -42,10 +42,6 @@ class BasePlotContainer(Container): # Deprecated traits # ------------------------------------------------------------------------ - #: Deprecated flag to indicate that a component needed to do old-style - #: drawing. Unused by any recent Chaco component. - use_draw_order = Bool(True) - #: Deprecated property for accessing the components in the container. plot_components = Property @@ -64,13 +60,3 @@ def _set_plot_components(self, new): DeprecationWarning, ) self._components = new - - def _use_draw_order_changed(self, old, new): - """Handler to catch the case when someone is trying to use the - old-style drawing mechanism, which is now unsupported. - """ - if new == False: - raise RuntimeError( - "The old-style drawing mechanism is no longer " - "supported in Chaco." - ) diff --git a/chaco/grid.py b/chaco/grid.py index 9ce504057..df6d1ba90 100644 --- a/chaco/grid.py +++ b/chaco/grid.py @@ -198,7 +198,7 @@ def do_layout(self, *args, **kw): Overrides PlotComponent. """ - if self.use_draw_order and self.component is not None: + if self.component is not None: self._layout_as_overlay(*args, **kw) else: super(PlotGrid, self).do_layout(*args, **kw) diff --git a/chaco/plot_component.py b/chaco/plot_component.py index bbb4aa6b7..e2aeccb62 100644 --- a/chaco/plot_component.py +++ b/chaco/plot_component.py @@ -62,20 +62,6 @@ class PlotComponent(Component): #: The default draw layer for Chaco plot components is the "plot" layer draw_layer = Str("plot") - #: Draw layers in **draw_order**? If False, use _do_draw() (for backwards - #: compatibility). - use_draw_order = Bool(True) - - def _use_draw_order_changed(self, old, new): - """Handler to catch the case when someone is trying to use the - old-style drawing mechanism, which is now unsupported. - """ - if new == False: - raise RuntimeError( - "The old-style drawing mechanism is no longer " - "supported in Chaco." - ) - @observe("+requires_redraw") def _plot_component_invalidated(self, event): self.invalidate_and_redraw()