Fix inserting items into wxListCtrl in wxGenericPrintSetupDialog
Set the ID before calling InsertItem(), otherwise it just fails (inserting an item without ID used to work in the generic version but never worked in the MSW one and was changed back in 2.9 to not work in the generic version neither for consistency).
This commit is contained in:
parent
02f7a5361d
commit
6832a58695
1 changed files with 2 additions and 1 deletions
|
|
@ -501,7 +501,8 @@ void wxGenericPrintSetupDialog::Init(wxPrintData* data)
|
|||
item.SetMask( wxLIST_MASK_TEXT );
|
||||
item.SetColumn( 1 );
|
||||
item.SetText( _("Default printer") );
|
||||
item.SetId( m_printerListCtrl->InsertItem( item ) );
|
||||
item.SetId( 0 );
|
||||
m_printerListCtrl->InsertItem( item );
|
||||
|
||||
if (data->GetPrinterName().empty())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue