← Back to team overview

kicad-developers team mailing list archive

Re: pcbnew: OS X cursor shape cannot be changed in any of the view

 

On 7/22/2015 1:47 AM, Bernhard Stegmaier wrote:
> 
>> On 22 Jul 2015, at 05:10, Garth Corral <gcorral@xxxxxxxxx
>> <mailto:gcorral@xxxxxxxxx>> wrote:
>>
>>
>>> On Jul 21, 2015, at 1:30 PM, Wayne Stambaugh <stambaughw@xxxxxxxxx
>>> <mailto:stambaughw@xxxxxxxxx>> wrote:
>>>
>>> On 7/21/2015 4:19 PM, Bernhard Stegmaier wrote:
>>>> OK, got it… the crosshair is only shown in some modes (didn’t really use
>>>> GAL up to now).
>>>> Yes, works also for me in GAL mode and not in default canvas.
>>>
>>> I'm not sure why this doesn't work in the default canvas.  Someone
>>> should probably take a look at it.  I'm guessing it has something to do
>>> with the overlays used on OSX.
>>>
>>
>> Um, perhaps it has something to do with this:
>>
>> #ifdef __WXMAC__
>>     m_defaultCursor = m_currentCursor = wxCURSOR_CROSS;
>>     m_showCrossHair = false;
>> #else
>>     m_defaultCursor = m_currentCursor = wxCURSOR_ARROW;
>>     m_showCrossHair = true;
>> #endif
>>
>> I’m assuming that this was done due to overlay issues as Wayne suggests.
> 
> You don’t have a XOR-drawing mode on OS X with wxWidgets, so the usual
> redraw-to-delete doesn’t work here.
> If you want to delete something you have to completely repaint the
> canvas or revert the the last state saved in the overlay (which is
> faster than a complete redraw but still not as fast as just drawing two
> lines).

It's all coming back to me now.  Bernhard is correct.  The reason the
cross-hairs are not used on OSX is because of the lack (or at least that
use to be the case) of a working XOR drawing mode.  I don't know if
anyone has tried enabling them on OSX recently.

> 
> If I haven’t tried yet, but if you just remove that ifdef I guess
> deletion of the crosshair won’t work at all (you would just fill up the
> canvas with crosshairs). Or, it could be quite slow (there is already
> now some noticeable lag when quickly moving around objects).
> However, I can give it a try on the weekend...
> 
> So, the real issue is not to have a XOR draw mode on OS X, which is
> quite the base of every drawing stuff in the default canvas of pcbnew
> and eeschema. Using this overlay hack is just a workaround with many
> problems (especially causing all those redraw issues in eeschema)...
> 
> 
> Regards,
> Bernhard
> 


References