[vtkusers] vtkChartLegend no longer dragable?

Joseph Melnyk JMelnyk at pile.com
Wed Jan 27 13:56:02 EST 2016


I agree that it's a great feature.  It's unfortunately broken in 6.1.0 as well.  There are some minor code changes between 5.10.0 and 6.3.0 but I don't see why they'd cause this.  Ultimately I was able to find a workaround.  I just inherited from vtkChartLegend and set "HorizontalAlignment = vtkChartLegend::CUSTOM" within the derived MouseMoveEvent before calling the same event in the base class.  Just setting this value once when creating the chart didn't work, but setting it here works fine.

Joe




-----Original Message-----
From: Marcus D. Hanwell [mailto:marcus.hanwell at kitware.com] 
Sent: Wednesday, January 27, 2016 1:01 PM
To: Joseph Melnyk <JMelnyk at pile.com>
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkChartLegend no longer dragable?

On Tue, Jan 26, 2016 at 2:43 PM, Joseph Melnyk <JMelnyk at pile.com> wrote:
> I’m slowly upgrading to vtk 6.3 from 5.10 and I am having trouble with 
> vtkChartLegend not being dragable.  The default should be drag enabled 
> is true but even after explicitly setting it, it’s not allowing me to 
> drag the legend.  This is using the code from 
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot.  Within 
> the exact same Visual Studio environment, if I build/link against the 
> 5.10 library, dragging the legend works fine; do the same with 6.3.0 
> and it doesn’t work at all.
>
I am not aware of any change to disable that feature, it may be a regression (I don't work on the chart code as much anymore).
>
> Any ideas what may have happened?  I may dig back into prior versions 
> of vtk to see where it stopped working.
>
I would be interested, I would like to keep this working as I think it is a nice feature.

Thanks,

Marcus


More information about the vtkusers mailing list