Don't try to release the mouse unless we actually have it captured.
The mouse capture can be lost if an event handler shows a modal dialog, for example. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4464,7 +4464,7 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event )
|
|||||||
|
|
||||||
if (m_isDragging)
|
if (m_isDragging)
|
||||||
{
|
{
|
||||||
m_rowLabelWin->ReleaseMouse();
|
if (m_rowLabelWin->HasCapture()) m_rowLabelWin->ReleaseMouse();
|
||||||
m_isDragging = FALSE;
|
m_isDragging = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4671,7 +4671,7 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
|
|||||||
|
|
||||||
if (m_isDragging)
|
if (m_isDragging)
|
||||||
{
|
{
|
||||||
m_colLabelWin->ReleaseMouse();
|
if (m_colLabelWin->HasCapture()) m_colLabelWin->ReleaseMouse();
|
||||||
m_isDragging = FALSE;
|
m_isDragging = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4881,7 +4881,7 @@ void wxGrid::ChangeCursorMode(CursorMode mode,
|
|||||||
|
|
||||||
if ( m_winCapture )
|
if ( m_winCapture )
|
||||||
{
|
{
|
||||||
m_winCapture->ReleaseMouse();
|
if (m_winCapture->HasCapture()) m_winCapture->ReleaseMouse();
|
||||||
m_winCapture = (wxWindow *)NULL;
|
m_winCapture = (wxWindow *)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5151,7 +5151,7 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
|
|||||||
{
|
{
|
||||||
if (m_winCapture)
|
if (m_winCapture)
|
||||||
{
|
{
|
||||||
m_winCapture->ReleaseMouse();
|
if (m_winCapture->HasCapture()) m_winCapture->ReleaseMouse();
|
||||||
m_winCapture = NULL;
|
m_winCapture = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user