|
From: Carlos P. <cpa...@ce...> - 2016-01-20 12:03:52
|
Applied to develop with reworded subject
On Wed 13 January 2016 11:09:30 cfalcon wrote:
> The handleEvent method of TaurusTrend2DItem raises an AttributeError
> when the plot object is not present.
>
> Fix it, ignoring the events when the plot object is None.
> ---
> lib/taurus/qt/qtgui/extra_guiqwt/image.py | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/taurus/qt/qtgui/extra_guiqwt/image.py
> b/lib/taurus/qt/qtgui/extra_guiqwt/image.py index e20a766..087f623
> 100644
> --- a/lib/taurus/qt/qtgui/extra_guiqwt/image.py
> +++ b/lib/taurus/qt/qtgui/extra_guiqwt/image.py
> @@ -256,8 +256,10 @@ class TaurusTrend2DItem(XYImageItem,
> TaurusBaseComponent): if evt_value is None or
> getattr(evt_value,'value', None) is None: self.debug('Ignoring event
> from %s'%repr(evt_src)) return
> -
> +
> plot = self.plot()
> + if plot is None:
> + return
>
> #initialization
> ySize = len(evt_value.value)
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
ALBA Synchrotron [http://www.albasynchrotron.es]
Carrer de la Llum 2-26
E-08290 Cerdanyola del Valles (Barcelona), Spain
E-mail: cpa...@ce...
Phone: +34 93 592 4428
+----------------------------------------------------+
|