← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Select filter dialog in GAL

 

Hi Orson,

Yes, I am aware that the existing dialog is not very advanced, but it
was a fairly simple job to use it in GAL, as you see in the patch, and
the code required is not extensive, and is easily replaced by a proper
filtering framework in future.
It certainly needs some more thought put into it in future, but at
least this way GAL is at least as capable as legacy. I was under no
illusions that this code is anything more than a temporary solution!

As for the menu, I think we could just use the NotEmpty
SELECTION_CONDITION to show the sub-menu on any selection, and the
items in the menu that don't apply will be greyed out as currently?
Perhaps the CONTEXT_MENU::HasEnabledItems could work too to delegate
the decision to the enablement functions of each item?

Cheers,

John

On Thu, Feb 23, 2017 at 1:11 AM, Maciej Sumiński
<maciej.suminski@xxxxxxx> wrote:
> Hi Jon,
>
> Thank you very much for you help. Actually we had another idea for the
> selection filter [1]. We would like to have a panel in the layer widget
> area and filter the selection all the time, instead of after invoking a
> dialog.
>
> As your patch is ready at the moment, we can merge it unless there are
> objections. It is likely that is going to be replaced in the future, but
> for now it should be fine. The most important point is the patch will
> reduce complaints about features missing in GAL, and for that I am
> sincerely thankful.
>
> One problem with the current implementation is that the Selection Filter
> dialog can be invoked only when the user right-clicks on a connected
> item, so he gets the options for selecting connected items.
>
> The same problem applies to 'select items in the same sheet', so perhaps
> these two entries could be moved somewhere else.
>
> Regards,
> Orson
>
> 1. http://www.ohwr.org/attachments/4646/selection_filter.pdf
>
> On 02/22/2017 03:41 PM, John Beard wrote:
>> Hi,
>>
>> I have rebased this branch over the new PCB_ACTION changes.
>>
>> Cheers,
>>
>> John
>>
>> On Sat, Feb 11, 2017 at 5:14 PM, John Beard <john.j.beard@xxxxxxxxx> wrote:
>>> Hi,
>>>
>>> Here is a branch with a GAL action to invoke the block select dialog
>>> and filter the current selection based on the results:
>>>
>>> https://code.launchpad.net/~john-j-beard/kicad/+git/kicad/+ref/select_filter
>>>
>>> The first commit refactors the dialog so it can be reached by the GAL
>>> too, the second plumbs it in to the GAL selection tool. I have used
>>> 'Shift-F' to invoke the dialog.
>>>
>>> Possibly controversial: use of a compilation firewall (PImpl
>>> idiom/opaque pointer) to allow SELECTION_TOOL to keep an instance of
>>> the dialog options for persistance between invocations. As the class
>>> is a nested class, it can't be simply forward declared.
>>>
>>> If it is preferred to not use PImpl in this way (since it's not
>>> commonly done in Kicad), I can redo it so the options class is not
>>> nested and forward declare it.
>>>
>>> Cheers,
>>>
>>> John
>>
>> _______________________________________________
>> 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