[vtk-developers] Interaction with color/opacity editors in vtkChartXY broken on retina display

Elvis Stansvik elvis.stansvik at orexplore.com
Tue May 30 03:10:24 EDT 2017


2017-05-29 18:40 GMT+02:00 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>:
> Here's a commit that hopefully removes the need for your `showEvent`
> override.
> https://gitlab.kitware.com/vtk/vtk/merge_requests/2885
>
> Can you give it a try please?

That fixes it indeed. Thanks! +2

Elvis

>
> Thanks
> Utkarsh
>
> On Mon, May 29, 2017 at 11:39 AM, Elvis Stansvik
> <elvis.stansvik at orexplore.com> wrote:
>>
>> 2017-05-29 17:34 GMT+02:00 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>:
>> > I suspect there's a bug in Qt when it comes to reparenting
>> > QOpenGLWidget. I
>> > can reproduce an issue with ParaView on linux when I simply undock the
>> > Color
>> > Map Editor and then redock it. The Color/Opacity widgets stay black.
>> > Looking
>> > at the code, I see this [1] happens when the dock widget is docked back
>> > into
>> > the main window. As expected the OpenGL context is destroyed, and
>> > QVTKOpenGLWIdget correctly does the cleanup. But the QVTKOpenGLWidget
>> > never
>> > gets a follow on paintGL call (unless I mouse over to resize the dock
>> > panel
>> > manually). Thus QVTKOpenGLWidget new repaints into the newly minted
>> > OpenGLContext/FBO resulting in a black widget.
>>
>> Ah, in my case I don't think there's reparenting involved though.
>>
>> My problem was that the interactor's size was never updated to cover
>> the render window when it was initially shown (I think), see my other
>> mail just now.
>>
>> Gotto head home, but will debug more tomorrow.
>>
>> Elvis
>>
>> >
>> > Utkarsh
>> >
>> > [1]
>> >
>> > https://code.woboq.org/qt5/qtbase/src/widgets/kernel/qopenglwidget.cpp.html#1418
>> >
>> >
>> > On Mon, May 29, 2017 at 11:06 AM, Marcus D. Hanwell
>> > <marcus.hanwell at kitware.com> wrote:
>> >>
>> >> On Mon, May 29, 2017 at 9:32 AM, Elvis Stansvik
>> >> <elvis.stansvik at orexplore.com> wrote:
>> >> >
>> >> > 2017-05-29 15:26 GMT+02:00 Sebastien Jourdain
>> >> > <sebastien.jourdain at kitware.com>:
>> >> > > You need to set the size on the interactor.
>> >> >
>> >> > Ah, how do I do that? (sorry for being a bit dumb)
>> >> >
>> >> > I've been scouring over the PV code, and I can't see that it does
>> >> > anything special with its interactor. It seems to just hook it up:
>> >> >
>> >> I assume you are using QVTKOpenGLWidget, we use this directly in
>> >> Tomviz for a few charts that control color/opacity too. This should be
>> >> handled in the QVTKOpenGLWidget, but it is possible an initialization
>> >> bug has crept in. I have noticed that ParaView often doesn't see this
>> >> issues as much due to resizing Qt widgets several times on startup, I
>> >> will see if I can get some time to test the latest Tomviz (we had this
>> >> working, but I haven't been tracking VTK master as closely these last
>> >> few weeks).
>> >> _______________________________________________
>> >> Powered by www.kitware.com
>> >>
>> >> Visit other Kitware open-source projects at
>> >> http://www.kitware.com/opensource/opensource.html
>> >>
>> >> Search the list archives at:
>> >> http://markmail.org/search/?q=vtk-developers
>> >>
>> >> Follow this link to subscribe/unsubscribe:
>> >> http://public.kitware.com/mailman/listinfo/vtk-developers
>> >>
>> >
>
>


More information about the vtk-developers mailing list