From b5302db70e2b46ab5f1107ad1f633c0fd9cd5607 Mon Sep 17 00:00:00 2001 From: "marco." Date: Mon, 19 Nov 2012 22:34:25 +0100 Subject: [PATCH] MacOSX: problems with cvpcb after multiline patch: 1) OSX compiler is really choosy (class_components_listbox.cpp) 2) Old OSX code maked an endless loop (listboxes.cpp) --- cvpcb/class_components_listbox.cpp | 6 ++---- cvpcb/cvpcb.h | 3 +++ cvpcb/listboxes.cpp | 3 --- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cvpcb/class_components_listbox.cpp b/cvpcb/class_components_listbox.cpp index 9d0a7a721b..a183c81bd3 100644 --- a/cvpcb/class_components_listbox.cpp +++ b/cvpcb/class_components_listbox.cpp @@ -17,7 +17,7 @@ COMPONENTS_LISTBOX::COMPONENTS_LISTBOX( CVPCB_MAINFRAME* parent, wxWindowID id, const wxPoint& loc, const wxSize& size, int nbitems, wxString choice[] ) : - ITEMS_LISTBOX_BASE( parent, id, loc, size, ~wxLC_SINGLE_SEL) + ITEMS_LISTBOX_BASE( parent, id, loc, size, LISTB_STYLE&(~wxLC_SINGLE_SEL)) { } @@ -85,12 +85,10 @@ void COMPONENTS_LISTBOX::SetSelection( unsigned index, bool State ) if( (index >= 0) && (GetCount() > 0) ) { -#ifndef __WXMAC__ Select( index, State ); -#endif EnsureVisible( index ); #ifdef __WXMAC__ - Refresh(); + Update(); #endif } } diff --git a/cvpcb/cvpcb.h b/cvpcb/cvpcb.h index 23f072242a..738a0143b6 100644 --- a/cvpcb/cvpcb.h +++ b/cvpcb/cvpcb.h @@ -19,6 +19,9 @@ #define FILTERFOOTPRINTKEY "FilterFootprint" +#define LISTB_STYLE wxSUNKEN_BORDER | wxLC_NO_HEADER | \ + wxLC_REPORT | wxLC_VIRTUAL + #include typedef boost::ptr_vector< COMPONENT_INFO > COMPONENT_LIST; diff --git a/cvpcb/listboxes.cpp b/cvpcb/listboxes.cpp index 65393727c3..c1e68a5910 100644 --- a/cvpcb/listboxes.cpp +++ b/cvpcb/listboxes.cpp @@ -18,9 +18,6 @@ * Not directly used: the 2 list boxes actually used are derived from it ******************************************************************************/ -#define LISTB_STYLE wxSUNKEN_BORDER | wxLC_NO_HEADER | \ - wxLC_REPORT | wxLC_VIRTUAL - ITEMS_LISTBOX_BASE::ITEMS_LISTBOX_BASE( CVPCB_MAINFRAME* aParent, wxWindowID aId, const wxPoint& aLocation, const wxSize& aSize, long aStyle) :