Don't call unimplemented virtual wxListCtrl::OnGetItemIsChecked()

This method should only be called when checkboxes are enabled and
calling it unconditionally triggered an assert failure.

See #18393.

Closes https://github.com/wxWidgets/wxWidgets/pull/1330
This commit is contained in:
Maarten Bent
2019-05-26 13:38:23 +02:00
committed by Vadim Zeitlin
parent d18d979371
commit 34efac1a21

View File

@@ -1681,7 +1681,11 @@ void wxListMainWindow::CacheLineData(size_t line)
ld->SetImage(col, listctrl->OnGetItemColumnImage(line, col));
}
ld->Check(listctrl->OnGetItemIsChecked(line));
if ( HasCheckBoxes() )
{
ld->Check(listctrl->OnGetItemIsChecked(line));
}
ld->SetAttr(listctrl->OnGetItemAttr(line));
}