Don't generate drag events without valid item in wxGenericListCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Jan 2012 14:52:51 +0000 (14:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Jan 2012 14:52:51 +0000 (14:52 +0000)
commitbecc95d84b957a9e32305a92e4253a623ba53983
tree908771def11ec1419927244eeb074efe8701827d
parent6a0e4ead1ecaba0eda898b0d80a7002654ec4baa
Don't generate drag events without valid item in wxGenericListCtrl.

Dragging the mouse from the empty area of the control must not generate any
drag events as there is nothing to drag there. Also, MSW version doesn't do
it.

So fix the generic version to avoid generating such invalid drag events too by
checking that we have a valid item before checking that we're dragging.

Closes #1619.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/generic/listctrl.cpp