[vtkusers] vtkInteractorStyleTrackballCamera problem with multiple views

Oleksandr Malyushytsky omalyushytskyvtkuser at gmail.com
Fri Oct 19 18:12:07 EDT 2018


Many thanks Jason for response!

I did manage to fix the problem
by adding
interactorStyle()->OnLeave();
interactorStyle()->OnLeftButtonUp();
interactorStyle()->OnMiddleButtonUp();
interactorStyle()->OnRightButtonUp();
interactorStyle()->OnFourthButtonUp();
interactorStyle()->OnFifthButtonUp();
to specific widget subclass

But this seems a wrong place for this fix.
QVTKOpenGLWidget should invoke such behavior (as I believe QVTKWidget was
doing).

Another problem is that I am not sure what function to call.
First impression is to call  OnLeave(), but it does not have any effect on
the vtkInteractorStyleTrackballCam.
I definitely can subclass every interactor style and override OnLeave() to
do a proper job,  but this seems was working with QVTKWidget  somehow, so I
would rather not subclass every vtkInteractorStyle to fix the behavior
which supposed to work already.

So I do have a workaround which requires a significant changes in
application, counting the number of places QVTKOpenGLWidget and
vtkInteractorStyle subclasses are used.








On Fri, Oct 19, 2018 at 12:29 PM Kimmel, Jason <jason.kimmel at albint.com>
wrote:

> Hi Alex,
>
>
>
> I see your original message from Monday, so it seems it was posted
> successfully.
>
>
>
> Regarding your question, I’m assuming each of the interactorstyles is in a
> different Qt widget?  If so, you could use Qt leave events to reset the
> state of the interactor whenever the mouse leaves the rendering area.  I’m
> not sure offhand if there’s a single method to reset the internal state of
> the interactorsyle, you may have to query GetState and then end whatever
> the interaction is.
>
>
>
> Hope that helps,
>
> Jason
>
>
>
>
>
> *Jason Kimmel*
>
> *Sr Software Developer – Research & Technology*
>
> *Albany Engineered Composites, Inc.*
>
> 112 Airport Drive
>
> Rochester, NH 03867
>
> Phone:  +1.603.330.5959
>
> *www.albint.com/aec <http://www.albint.com/aec>*
>
>
>
>
>
>
>
>
>
> *From:* vtkusers [mailto:vtkusers-bounces at public.kitware.com] *On Behalf
> Of *Oleksandr Malyushytsky
> *Sent:* Thursday, October 18, 2018 4:47 PM
> *To:* vtkusers at public.kitware.com
> *Subject:* Re: [vtkusers] vtkInteractorStyleTrackballCamera problem with
> multiple views
>
>
>
> *CAUTION:* This email originated from outside Albany International Corp.
> Do not click links or open attachments unless you recognize the sender and
> know the content is safe.
>
>
>
> For some reason I can't see my question in mail, so I am not sure was it
> posted, but was not replied or never ended up in the mailing list.
>
>
>
> 1. Could anybody confirm that it was posted on mailing list?
>
> 2. Can anybody give a hint how to notify interactor style (reset mode)
> when even propagated to other widget?
>
>
>
> Best regards,
>
>           Alex
>
>
>
>
>
> On Mon, Oct 15, 2018 at 3:48 PM Oleksandr Malyushytsky <
> omalyushytskyvtkuser at gmail.com> wrote:
>
> 1. Push the left mouse button.
>
> 2. Drag the mouse out of the view, do not release it
>
> 3. Click and release right mouse button (or middle button, any button
> which was not grabbed). Release left mouse button.
>
> 4 In this state you can move mouse back to view. View will behave like
> left mouse button is clicked.
>
>
>
> Problem is that only left button was grabbing a mouse. Releasing right
> mouse button will prevent interactorStyle from receiving  OnLeftButtonUp(),
>
>
>
> so when you move mouse into the view  not even it will still remain  in
> previously set interaction state, but the appropriate mouse button will not
> be grabbed.
>
>
>
> This seems like a bug and I would appreciate if anybody could at least
> point on work around.
>
> It does not appear on my version of paraview, but I am not sure what fixed
> the behaviour.
>
>
>
> (I use  vtk 8.1.1 with Qt 5.9)
>
>
>
> Best regards,
>
>       Alex
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181019/52e2f81f/attachment.html>


More information about the vtkusers mailing list