View Issue Details

IDProjectCategoryView StatusLast Update
0000506FreeCADPatchpublic2011-12-04 14:53
Reporterj-dowsettAssigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version0.11 
Target VersionFixed in Version0.13 
Summary0000506: Modifying focus when creating pad.
DescriptionCurrent version behaviour (SVN 5207):
-New part
-Create sketch, draw & close sketch
-Click pad in tasks

The default length of '10.00' is selected, but it does not have focus
-since it's selected I instinctively directly type in what length I want.
-since it doesn't have focus, my number input instead goes into selecting one of the default views

I'd like to request that the behaviour is changed so that the pad parameters, and the selected '10.00', has focus and that my number input goes to changing the length.

Alternatively, if this behaviour is not deemed desirable, I'd like the '10.00' not to be selected which would indicate that it doesn't have focus.


I've modified the code to reflect my preferred behaviour, if this is deemed desirable. The patch files attached are from SVN diff, but I'm not sure they'll work - the original diff file includes other modifications I've made not relevant to this, I don't know how to exclude them - instead I've also attached a diff file I've modified where I've removed the non-relevant bits, but I'm not sure it's that simple?

If it's not clear what I've done then I'll be happy to post the entire modified files.

Affected are
ViewProviderPad.cpp
TaskPadParameters.h
TaskPadParameters.cpp

The fix seems a little convoluted, but if the instruction to setFocus was implemented inside any of the constructors then it failed to work.
TagsNo tags attached.

Activities

2011-12-02 16:37

 

modified_pad_task.patch (Attachment missing)

2011-12-02 16:38

 

pad_task.patch (Attachment missing)

j-dowsett

2011-12-02 16:40

reporter   ~0001384

Last edited: 2011-12-02 16:44

Perhaps should have been clearer - don't use pad_task.patch - it includes other modifications.

modified_pad_task.patch may or may not be usable as I removed the other modifications by hand.


Oh, also, if this is deemed a useful change (and in the way that I've done it), I'll happily do the same for pocket and fillet.

j-dowsett

2011-12-03 16:32

reporter   ~0001388

Ok, ignore all that, much neater, in TaskPadParameters.cpp, at the end of TaskPadParameters constructor, simply replace

    setFocus();

with

       QMetaObject::invokeMethod(ui->doubleSpinBox, "setFocus", Qt::QueuedConnection);


Much better. I thought I'd tried that, but I think I had 'this' instead of 'ui->doubleSpinBox' as the target.

wmayer

2011-12-04 14:53

administrator   ~0001389

Done in rev 5216.

Issue History

Date Modified Username Field Change
2011-12-02 16:37 j-dowsett New Issue
2011-12-02 16:37 j-dowsett File Added: modified_pad_task.patch
2011-12-02 16:38 j-dowsett File Added: pad_task.patch
2011-12-02 16:40 j-dowsett Note Added: 0001384
2011-12-02 16:44 j-dowsett Note Edited: 0001384
2011-12-03 16:32 j-dowsett Note Added: 0001388
2011-12-04 14:53 wmayer Note Added: 0001389
2011-12-04 14:53 wmayer Status new => closed
2011-12-04 14:53 wmayer Resolution open => fixed
2011-12-04 14:53 wmayer Fixed in Version => 0.13