[fixed] [regression] Link feature broke PD's patterns dialog

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
User avatar
uwestoehr
Posts: 1542
Joined: Sun Jan 27, 2019 3:21 am

Re: [fixed] [regression] Link feature broke PD's patterns dialog

Post by uwestoehr » Sun Feb 16, 2020 3:52 pm

realthunder wrote:
Sun Feb 16, 2020 4:58 am
I have moved common logic in onSelectionChanged of various transformed task panels into the parent TaskTransformedParameters:originalSelected()
Cool feature! I hope that your toponaming stuff is merged soon after the release of 0.19 since toponaming is THE killer argument against using FC. And this it is sad because if this would be improved, FC is a super useful CAD program. Btw., I think also the Sketcher WB needs to be made toponaming-safe, right?

------------------------

Besides this I need help with a special issue and since you know the internals of FC maybe you can help me:
- Take the current master and open there the fillet dialog.
- select an edge in the list and press DEL

result: nothing happens

- now press the Add button and then DEL

result: now the deletion is performed.

I found out that the reason is that after
Gui::Selection().addSelection(..)
is executed in TaskDressUpParameters::setSelection all keypresses are filtered. First after executing
Gui::Selection().clearSelection()
keypresses are taken into account. But of course one needs the active selection to show the user.

This issue also affects other WBs like FEM: https://forum.freecadweb.org/viewtopic.php?f=18&t=43402
wmayer
Site Admin
Posts: 15937
Joined: Thu Feb 19, 2009 10:32 am

Re: [fixed] [regression] Link feature broke PD's patterns dialog

Post by wmayer » Sun Feb 16, 2020 8:11 pm

Besides this I need help with a special issue and since you know the internals of FC maybe you can help me:
In the output window you may get a warning: QAction::eventFilter: Ambiguous shortcut overload: Del

The reason is that if something is selected the global Delete command will be active, too. So there are two active QActions with the same shortcut and that's why nothing happens.

There is a trick to tell Qt to forward the key event to the task panel: override the event() method and handle the event type QEvent::Shortcut and accept the event if Del was pressed. Qt then emits a key event and directly sends it to the task panel.
User avatar
uwestoehr
Posts: 1542
Joined: Sun Jan 27, 2019 3:21 am

Re: [fixed] [regression] Link feature broke PD's patterns dialog

Post by uwestoehr » Sun Feb 16, 2020 8:57 pm

wmayer wrote:
Sun Feb 16, 2020 8:11 pm
There is a trick to tell Qt to forward the key event to the task panel: override the event() method and handle the event type QEvent::Shortcut and accept the event if Del was pressed. Qt then emits a key event and directly sends it to the task panel.
Many thanks! However since I am a real newbie in this regard, could you maybe give me some code lines and I'll put it in to the different dialogs (also for FEM)?
realthunder
Posts: 1575
Joined: Tue Jan 03, 2017 10:55 am

Re: [fixed] [regression] Link feature broke PD's patterns dialog

Post by realthunder » Sun Feb 16, 2020 9:43 pm

uwestoehr wrote:
Sun Feb 16, 2020 3:52 pm
Cool feature! I hope that your toponaming stuff is merged soon after the release of 0.19 since toponaming is THE killer argument against using FC. And this it is sad because if this would be improved, FC is a super useful CAD program. Btw., I think also the Sketcher WB needs to be made toponaming-safe, right?
Yes sure. In fact, my work on topo naming starts with Sketch, while I worked on Sketch Export, because I need a way to stabilize the exported Sketch elements.

wmayer wrote:
Sun Feb 16, 2020 8:59 pm
ping
Since its mentioned, just take the opportunity to ask. Do you think there's still time to merge the topo naming feature in 0.19?
Try Assembly3 (latest version 0.11) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
uwestoehr
Posts: 1542
Joined: Sun Jan 27, 2019 3:21 am

Re: [fixed] [regression] Link feature broke PD's patterns dialog

Post by uwestoehr » Sun Feb 16, 2020 9:49 pm

realthunder wrote:
Sun Feb 16, 2020 9:43 pm
Since its mentioned, just take the opportunity to ask. Do you think there's still time to merge the topo naming feature in 0.19?
Well, some months ago I was very enthusiastic but now after working with the code AND FC itself almost daily, I think it is for now better to make 0.19 ready. For my taste there are too many issues and even crashes.

My proposal:
to start the (then 1.0 :D development cycle) directly after FC 0.19 is released.
For now let's focus on fixing bugs and testing the new features thoroughly.
wmayer
Site Admin
Posts: 15937
Joined: Thu Feb 19, 2009 10:32 am

Re: [fixed] [regression] Link feature broke PD's patterns dialog

Post by wmayer » Sun Feb 16, 2020 10:37 pm

realthunder wrote:
Sun Feb 16, 2020 9:43 pm
Since its mentioned, just take the opportunity to ask. Do you think there's still time to merge the topo naming feature in 0.19?
No, we shouldn't because then too many things are under heavy change. IMO most of the current pending PR should be merged and then we should start the feature freeze.
realthunder
Posts: 1575
Joined: Tue Jan 03, 2017 10:55 am

Re: [fixed] [regression] Link feature broke PD's patterns dialog

Post by realthunder » Sun Feb 16, 2020 11:23 pm

wmayer wrote:
Sun Feb 16, 2020 10:37 pm
realthunder wrote:
Sun Feb 16, 2020 9:43 pm
Since its mentioned, just take the opportunity to ask. Do you think there's still time to merge the topo naming feature in 0.19?
No, we shouldn't because then too many things are under heavy change. IMO most of the current pending PR should be merged and then we should start the feature freeze.
Yes, got it.
Try Assembly3 (latest version 0.11) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
wmayer
Site Admin
Posts: 15937
Joined: Thu Feb 19, 2009 10:32 am

Re: [fixed] [regression] Link feature broke PD's patterns dialog

Post by wmayer » Mon Feb 17, 2020 12:01 am

Unfortunately, the key event is not handled automatically. It must be also explicitly handled by the task panel class: See git commit 7aad85e9c
Remark: The QAction should be a private member variable because accessing it with

Code: Select all

QAction *action = ui->listWidgetReferences->actions().at(0); // we have only one action
is prone to fail when later a second action might be added.
User avatar
uwestoehr
Posts: 1542
Joined: Sun Jan 27, 2019 3:21 am

Re: [fixed] [regression] Link feature broke PD's patterns dialog

Post by uwestoehr » Mon Feb 17, 2020 9:00 am

wmayer wrote:
Mon Feb 17, 2020 12:01 am
Unfortunately, the key event is not handled automatically. It must be also explicitly handled by the task panel class: See git commit 7aad85e9c
Many thanks, also for the remark. I'll spread this change to the other dialogs as soon as my pending PR for the fillet dialog is merged.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest