Cvpcb: fix a regression: in the stable version one could select many components and assign a footprint to the whole selection. Select more than on component is now re-enabled

This commit is contained in:
jean-pierre charras 2015-06-05 15:46:05 +02:00
parent c582cf5946
commit fb059b99b6
6 changed files with 8 additions and 8 deletions

View File

@ -36,7 +36,7 @@
COMPONENTS_LISTBOX::COMPONENTS_LISTBOX( CVPCB_MAINFRAME* parent, wxWindowID id,
const wxPoint& loc, const wxSize& size ) :
ITEMS_LISTBOX_BASE( parent, id, loc, size, LISTB_STYLE & ~wxLC_SINGLE_SEL )
ITEMS_LISTBOX_BASE( parent, id, loc, size, 0 )
{
}

View File

@ -42,7 +42,7 @@
FOOTPRINTS_LISTBOX::FOOTPRINTS_LISTBOX( CVPCB_MAINFRAME* parent,
wxWindowID id, const wxPoint& loc,
const wxSize& size ) :
ITEMS_LISTBOX_BASE( parent, id, loc, size )
ITEMS_LISTBOX_BASE( parent, id, loc, size, wxLC_SINGLE_SEL )
{
}

View File

@ -42,7 +42,7 @@
LIBRARY_LISTBOX::LIBRARY_LISTBOX( CVPCB_MAINFRAME* parent, wxWindowID id,
const wxPoint& loc, const wxSize& size ) :
ITEMS_LISTBOX_BASE( parent, id, loc, size )
ITEMS_LISTBOX_BASE( parent, id, loc, size, wxLC_SINGLE_SEL )
{
}

View File

@ -33,8 +33,6 @@
#define FILTERFOOTPRINTKEY "FilterFootprint"
#define LISTB_STYLE ( wxSUNKEN_BORDER | wxLC_NO_HEADER | wxLC_REPORT | wxLC_VIRTUAL | \
wxLC_SINGLE_SEL | wxVSCROLL | wxHSCROLL )
extern const wxString EquFileExtension;
extern const wxString EquFilesWildcard;

View File

@ -36,6 +36,8 @@ class CVPCB_MAINFRAME;
class COMPONENT;
class FOOTPRINT_LIST;
#define LISTBOX_STYLE ( wxSUNKEN_BORDER | wxLC_NO_HEADER | wxLC_REPORT | wxLC_VIRTUAL | \
wxVSCROLL | wxHSCROLL )
/*********************************************************************/
/* ListBox (base class) to display lists of components or footprints */
@ -45,7 +47,7 @@ class ITEMS_LISTBOX_BASE : public wxListView
public:
ITEMS_LISTBOX_BASE( CVPCB_MAINFRAME* aParent, wxWindowID aId,
const wxPoint& aLocation, const wxSize& aSize,
long aStyle = wxLC_SINGLE_SEL );
long aStyle = 0 );
~ITEMS_LISTBOX_BASE();

View File

@ -44,7 +44,7 @@
ITEMS_LISTBOX_BASE::ITEMS_LISTBOX_BASE( CVPCB_MAINFRAME* aParent, wxWindowID aId,
const wxPoint& aLocation, const wxSize& aSize,
long aStyle) :
wxListView( aParent, aId, aLocation, aSize, LISTB_STYLE | aStyle ), columnWidth(0)
wxListView( aParent, aId, aLocation, aSize, LISTBOX_STYLE | aStyle ), columnWidth(0)
{
InsertColumn( 0, wxEmptyString );
}
@ -95,7 +95,7 @@ void ITEMS_LISTBOX_BASE::UpdateLineWidth( unsigned aLine )
{
columnWidth = newWidth;
SetColumnWidth( 0, columnWidth );
}
}
}