← Back to team overview

kicad-developers team mailing list archive

Re: 3D refactor

 

Thanks Wayne,

 I had a look at the code and part of the problem seems to be that
the wxGLCanvas derived class wasn't calling event.Skip() on the
mouse buttons. I just added event.Skip() and the 3D frame now
gets the focus upon clicking. I decided against the ENTER_WINDOW
event since that could interfere with the GUI flow by stealing focus
when the user really doesn't want that to happen.

- Cirilo


On Wed, Mar 2, 2016 at 11:15 AM, Wayne Stambaugh <stambaughw@xxxxxxxxx>
wrote:

> Take a look at the wxEVT_ENTER_WINDOW event.  You can set the canvas
> focus on this event.  This event should fire when the mouse enters the
> canvas so it should be handled there unless the parent frame window
> doesn't pass it down to the child canvas window.
>
> On 3/1/2016 5:24 PM, Cirilo Bernardo wrote:
> > Thanks Bernhard,
> >
> >  I found on MSWin after adding the SetFocus() as Mario suggested,
> > if I click somewhere else the wxGLCanvas loses focus again and
> > the rotate etc. no longer works until I use [tab] to set focus to the
> > window.
> >
> >  Are there any GUI experts out there who have some idea how we
> > can ensure that the wxGLCanvas frame has focus when the mouse
> > is above it?
> >
> > - Cirilo
> >
> >
> > On Wed, Mar 2, 2016 at 8:03 AM, Bernhard Stegmaier
> > <stegmaier@xxxxxxxxxxxxx <mailto:stegmaier@xxxxxxxxxxxxx>> wrote:
> >
> >     I’ll check zoom on OS X hopefully tomorrow.
> >     I can tell that rotating the preview does work as expected.
> >     And if I remember correctly, I did accidentally zoom once, but I
> >     didn’t pay attention how I did it and if it was as it should be.
> >
> >>     On 01 Mar 2016, at 21:52, Cirilo Bernardo
> >>     <cirilo.bernardo@xxxxxxxxx <mailto:cirilo.bernardo@xxxxxxxxx>>
> wrote:
> >>
> >>     Thanks Mario,
> >>
> >>      I'll test that on MSWin soon; hopefully that works now.
> >>
> >>     - Cirilo
> >>
> >>     On Tue, Mar 1, 2016 at 9:03 PM, Mário Luzeiro <mrluzeiro@xxxxx
> >>     <mailto:mrluzeiro@xxxxx>> wrote:
> >>
> >>         > I'd also appreciate some help from anyone on the zoom
> function for the
> >>         > 3D preview pane. The zoom works on Linux when using the mouse
> scroll
> >>         > wheel but in MSWin I can only change the viewing angle, not
> the zoom. On
> >>         > OSX I have no idea what the status is for zooming the model.
> >>
> >>         Hi Cirilo,
> >>
> >>         Looks like it was an old know wxWidgets issue, I fixed at:
> >>
> http://bazaar.launchpad.net/~mrluzeiro/kicad/kicad_new3d-viewer/revision/5897
> >>
> >>         I found it here:
> >>
> https://github.com/KiCad/kicad-source-mirror/blob/a9427f899926155e48cab93187415710abc5438a/3d-viewer/3d_frame.cpp#L220
> >>
> >>         In any case, in my windows laptop, the touchpad is not able to
> >>         scrool.. but. I think it is some particularity of this
> >>         windows/laptop...
> >>         I tested with a mouse and it worked.
> >>
> >>         Mario Luzeiro
> >>
> >>
> >>     _______________________________________________
> >>     Mailing list: https://launchpad.net/~kicad-developers
> >>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> >>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> >>     Unsubscribe : https://launchpad.net/~kicad-developers
> >>     More help   : https://help.launchpad.net/ListHelp
> >
> >
> >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References