← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Simulator: Fix probe and tune cursors on OSX.

 

Thank you Johannes, I have just applied your patch. This part of code is
a truly a demonstration of wxWidgets platform independence.

Good that at least they give you hints. Today I got an assert: "failed
in Add(): invalid bitmap size in wxImageList: this might work on this
platform but definitely won't under Windows."

Regards,
Orson

On 08/29/2016 02:25 PM, Johannes Maibaum wrote:
> Commit c9a1b45666b1db94d66dc5ab4703f8413614de5f changed the mask color
> of the tune and probe cursors to fix their appearance on Windows, but
> this broke them on OSX.
> ---
>  eeschema/sim/simulate.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/eeschema/sim/simulate.cpp b/eeschema/sim/simulate.cpp
> index c704995..f093490 100644
> --- a/eeschema/sim/simulate.cpp
> +++ b/eeschema/sim/simulate.cpp
> @@ -107,7 +107,9 @@ public:
>              wxBitmap probe_mask_bitmap( (const char*) cursor_probe_mask, 32, 32 );
>              probe_bitmap.SetMask( new wxMask( probe_mask_bitmap ) );
>              probe_image = new wxImage( probe_bitmap.ConvertToImage() );
> +#ifdef __WXMSW__
>              probe_image->SetMaskColour( 255, 255, 255 );
> +#endif
>              probe_image->SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_X, 0 );
>              probe_image->SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_Y, 31 );
>          }
> @@ -125,7 +127,9 @@ public:
>              wxBitmap tune_mask_bitmap( (const char*) cursor_tune_mask, 32, 32 );
>              tune_bitmap.SetMask( new wxMask( tune_mask_bitmap ) );
>              tune_image = new wxImage( tune_bitmap.ConvertToImage() );
> +#ifdef __WXMSW__
>              tune_image->SetMaskColour( 255, 255, 255 );
> +#endif
>              tune_image->SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_X, 0 );
>              tune_image->SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_Y, 31 );
>          }
> 


Attachment: signature.asc
Description: OpenPGP digital signature


References