← Back to team overview

kicad-developers team mailing list archive

Fwd: [PATCH] Right click option to change layer and render color

 

---------- Forwarded message ----------
From: Seppe Stas <seppestas@xxxxxxxxx>
Date: 2017-09-22 12:33 GMT+02:00
Subject: Re: [Kicad-developers] [PATCH] Right click option to change layer
and render color
To: Maciej Sumiński <maciej.suminski@xxxxxxx>


I just found out the "double click" method to change layer color does not
work yet in KiCad 4.0.7. The tooltip however does work in that version.

I also noticed the color swatch looks different. In KiCad 4.0.7 the swatch
is contained in some kind of "button", while on master the swatch is just a
square (the new swatch looks nicer imo). See attached image (master on
left, 4.0.7 on right. macOS 10.12.6).

[image: Inline afbeelding 1]

I'll try to figure out why the tooltip stopped working.

Seppe



2017-09-22 11:45 GMT+02:00 Seppe Stas <seppestas@xxxxxxxxx>:

> Ok, I was able to reproduce this, I'll fix it and send a patch.
>
> 2017-09-22 11:36 GMT+02:00 Maciej Sumiński <maciej.suminski@xxxxxxx>:
>
>> Seppe,
>>
>> Try to build GerbView:
>>
>> /home/orson/workspace/kicad-master/gerbview/gerbview_frame.cpp:112:27:
>> error: allocating an object of abstract class type 'GERBER_LAYER_WIDGET'
>>     m_LayersManager = new GERBER_LAYER_WIDGET( this, m_canvas, pointSize
>> );
>>                           ^
>> /home/orson/workspace/kicad-master/gerbview/../pcbnew/layer_
>> widget.h:447:18:
>> note: unimplemented pure virtual method 'OnLayerRightClick' in
>> 'GERBER_LAYER_WIDGET'
>>     virtual void OnLayerRightClick( wxMenu& aMenu ) = 0;
>>
>> Adding a pure virtual method to LAYER_WIDGET [1] obligates you to
>> provide an implementation for all inheriting classes (here
>> PCB_LAYER_WIDGET and GERBER_LAYER_WIDGET), if you want to instantiate
>> them.
>>
>> Regards,
>> Orson
>>
>> 1.
>> http://ci.kicad-pcb.org/job/kicad-doxygen/ws/Documentation/d
>> oxygen/html/classLAYER__WIDGET.html
>>
>>
>> On 09/22/2017 11:32 AM, Seppe Stas wrote:
>> > Hey Maciej
>> >
>> > Could you clarify what part of the code does not compile? I built the
>> KiCad
>> > project manager and PCBNew without any issues, I didn't think other
>> parts
>> > would be impacted by this.
>> >
>> > Seppe
>> >
>> > 2017-09-22 11:21 GMT+02:00 Maciej Sumiński <maciej.suminski@xxxxxxx>:
>> >
>> >> Hi Seppe,
>> >>
>> >> This is a very good idea. I would have merged the patch, but you need
>> to
>> >> implement GERBER_LAYER_WIDGET::OnLayerRightClick(), as in the current
>> >> state the code does not compile.
>> >>
>> >> Regards,
>> >> Orson
>> >>
>> >> On 09/21/2017 06:25 PM, Seppe Stas wrote:
>> >>> This patch makes it possible to change the color of layers and render
>> >>> options using the right click menu. See attached picture:
>> >>> [image: Inline afbeelding 1]
>> >>>
>> >>> The motivation for this is the current "double left click / middle
>> click"
>> >>> being somewhat obscure. I've been using KiCad for over 2 years and
>> >> recently
>> >>> found out about the double click method by looking at KiCad's source
>> code
>> >>> (I stumbled on the middle mouse button method earlier). At one point I
>> >> even
>> >>> borrowed a mouse from my colleague to change layer colors when I
>> needed
>> >> to
>> >>> open a 6 layer board since I typically use a trackpad without a middle
>> >>> mouse button. My colleagues, most of whom have been using KiCad for
>> >> longer
>> >>> than me, didn't even know changing the layer/render color is possible.
>> >>>
>> >>> Being able to change properties of a selected item using the right
>> mouse
>> >>> button is a lot more common in modern GUI applications and is more
>> >>> consistent with how the rest of pcbnew works.
>> >>>
>> >>> Greetings
>> >>> Seppe Stas
>> >>>
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> 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
>> >>
>> >>
>> >
>>
>>
>>
>

PNG image


Follow ups

References