First test drive ...

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: First test drive ...

Post by ian.rees »

wandererfan - have a look at https://github.com/ianrrees/FreeCAD_tin ... -field-qt5 - it mostly "works" except that the first click after editing template text essentially gets missed.

I'm thinking about moving the dialog creation from TemplateTextField::mousePressEvent() in to a QGVPage slot, because it seems that popping up the dialog in the mouse event handler screws up the handling of mouse press events. That has a nice follow-on benefit, in that we could pop up a more complex dialog that allows for editing all the editable texts in one dialog (but has the clicked one preselected). -Ian-
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: First test drive ...

Post by ian.rees »

I've made a PR to fix this: https://github.com/FreeCAD/FreeCAD/pull/713 . I'm fairly certain it will still work with Qt4, but haven't personally tested it yet ;). -Ian-
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: First test drive ...

Post by sgrogan »

ian.rees wrote:I've made a PR to fix this: https://github.com/FreeCAD/FreeCAD/pull/713 . I'm fairly certain it will still work with Qt4, but haven't personally tested it yet ;). -Ian-
This works for me Thanks!
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10950 (Git)
Build type: Release
Branch: master
Hash: 6368b2f822cf838ee6c50ebf62480ff86c214317
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
"fight the good fight"
User avatar
wandererfan
Veteran
Posts: 6320
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: First test drive (TemplateTextField) ...

Post by wandererfan »

ian.rees wrote:the first click after editing template text essentially gets missed.
This is great, Ian, thank you. I get good results on Win7 and Ubuntu 12.04 as below. I cannot confirm the missing mouse click on either platform. Pick one of [poor manual dexterity, wonky touchpad on old laptop, not a problem on these platforms].

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10950 (Git)
Build type: Release
Branch: master
Hash: 6368b2f822cf838ee6c50ebf62480ff86c214317
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0

OS: Ubuntu 12.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10950 (Git)
Build type: debug
Branch: master
Hash: 6368b2f822cf838ee6c50ebf62480ff86c214317
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
OCC version: 7.1.0
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: First test drive ...

Post by ian.rees »

No problem! I think the missing click thing is fixed now, though thinking about it more I think the initial change I made to check the click position against the rect dimensions probably isn't necessary anymore. Will try to poke around at it a bit more in the next few evenings - I found some old TODO items I had left in there, so was going to try and clean those up a bit. -Ian-
User avatar
r-frank
Veteran
Posts: 2180
Joined: Thu Jan 24, 2013 6:26 pm
Location: Möckmühl, Germany
Contact:

Re: First test drive ...

Post by r-frank »

Sounds like great news .

Thanks a lot to all involved for holding on ...
Deutsche FreeCAD Tutorials auf Youtube
My GrabCAD FreeCAD-Projects
FreeCAD lessons for beginners in english

Native german speaker - so apologies for my english, no offense intended :)
Post Reply