Quiet wxWidgets assert (KICAD-XJ2).

This commit is contained in:
Jeff Young 2025-07-12 22:45:36 +01:00
parent 8d07eb7f24
commit 2d2ba268ae

View File

@ -165,9 +165,12 @@ void LISTBOX_TRICKS::listBoxPaste()
wxTheClipboard->Close();
}
if( lines.IsEmpty() )
return;
wxArrayInt selections;
m_listBox.GetSelections( selections );
int insertAt = selections.GetCount() > 0 ? selections.back() + 1 : m_listBox.GetCount();
int insertAt = selections.GetCount() > 0 ? (int) selections.back() + 1 : (int) m_listBox.GetCount();
for( wxString& line : lines )
{