kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #04977
Re: Label selection patch
On 07/15/2010 09:08 AM, M M wrote:
> Hi,
>
> I was having a problem selecting a global label near a component. I've
> uploaded an example case to
> http://img441.imageshack.us/img441/8088/kicad.png. It is impossible to
> move the +5V label since it cannot be selected. The component next to
> it is always selected instead. It seems that
> SchematicGeneralLocateAndDisplay in controle.cpp does not do what is
> written in the comments about selection priorities. Something along
> the lines of the following patch seems to fix the problem:
>
> =====================
>
> --- kicad-bzr/eeschema/controle.cpp 2010-07-15 16:45:18.000000000 +0300
> +++ kicad/eeschema/controle.cpp 2010-07-15 17:06:00.000000000 +0300
> @@ -175,6 +175,13 @@
> return DrawStruct;
> }
>
> + DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(),
> LABELITEM );
> + if( DrawStruct )
> + {
> + ClearMsgPanel();
> + return DrawStruct;
> + }
> +
> /* search for a pin */
> Pin = LocateAnyPin( (SCH_ITEM*) m_CurrentSheet->LastDrawList(),
> refpoint,
> &LibItem );
>
> =====================
We have an item in the TODO.txt file that says, pertaining to EESchema:
* Use collector classes.
This is the menu that pops up in PCBNEW when you have an ambiguous hit
detection.
Although I added the collector classes and installed them into PCBNEW,
Jean Pierre seems to think this type of UI would also be helpful in
EESCHEMA, since he added the TODO item.
It certainly would have solved this problem that you report Marco.
We can think about committing this patch on a short term basis, or I
might wake up one Saturday morning and have enough time to install the
collector support into EESCHEMA. I don't think the patch is
comprehensive enough to deal the entire subject matter.
Dick
References