forgot to capture mouse during drag-resizing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57192 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -237,6 +237,9 @@ void wxHeaderCtrl::EndDragging()
|
|||||||
UpdateResizingMarker(-1);
|
UpdateResizingMarker(-1);
|
||||||
|
|
||||||
m_overlay.Reset();
|
m_overlay.Reset();
|
||||||
|
|
||||||
|
// don't use the special dragging cursor any more
|
||||||
|
SetCursor(wxNullCursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxHeaderCtrl::EndResizing(int width)
|
void wxHeaderCtrl::EndResizing(int width)
|
||||||
@@ -246,6 +249,11 @@ void wxHeaderCtrl::EndResizing(int width)
|
|||||||
|
|
||||||
EndDragging();
|
EndDragging();
|
||||||
|
|
||||||
|
// if dragging was cancelled we must have already lost the mouse capture so
|
||||||
|
// don't try to release it
|
||||||
|
if ( width != -1 )
|
||||||
|
ReleaseMouse();
|
||||||
|
|
||||||
wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_END_DRAG, GetId());
|
wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_END_DRAG, GetId());
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
event.SetColumn(m_colBeingResized);
|
event.SetColumn(m_colBeingResized);
|
||||||
@@ -401,6 +409,8 @@ void wxHeaderCtrl::OnMouse(wxMouseEvent& mevent)
|
|||||||
{
|
{
|
||||||
// start resizing the column
|
// start resizing the column
|
||||||
m_colBeingResized = col;
|
m_colBeingResized = col;
|
||||||
|
SetCursor(wxCursor(wxCURSOR_SIZEWE));
|
||||||
|
CaptureMouse();
|
||||||
UpdateResizingMarker(xPhysical);
|
UpdateResizingMarker(xPhysical);
|
||||||
}
|
}
|
||||||
else // on column itself
|
else // on column itself
|
||||||
|
Reference in New Issue
Block a user