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
// Internal Helper function for computing row or column from some
// (unscrolled) coordinate value, using either
// Internal Helper function for computing row or column from some
// (unscrolled) coordinate value, using either
-// m_defaultRowHeight/m_defaultColWidth or binary search on array
+// m_defaultRowHeight/m_defaultColWidth or binary search on array
// of m_rowBottoms/m_ColRights to speed up the search!
// Internal helper macros for simpler use of that function
// of m_rowBottoms/m_ColRights to speed up the search!
// Internal helper macros for simpler use of that function
- m_rowLabelWin->ReleaseMouse();
+ if (m_rowLabelWin->HasCapture()) m_rowLabelWin->ReleaseMouse();
- m_colLabelWin->ReleaseMouse();
+ if (m_colLabelWin->HasCapture()) m_colLabelWin->ReleaseMouse();
- m_winCapture->ReleaseMouse();
+ if (m_winCapture->HasCapture()) m_winCapture->ReleaseMouse();
m_winCapture = (wxWindow *)NULL;
}
m_winCapture = (wxWindow *)NULL;
}
- m_winCapture->ReleaseMouse();
+ if (m_winCapture->HasCapture()) m_winCapture->ReleaseMouse();
// cell is shifted by one pixel
// However, don't allow x or y to become negative
// cell is shifted by one pixel
// However, don't allow x or y to become negative
- // since the SetSize() method interprets that as
+ // since the SetSize() method interprets that as
// "don't change."
if (rect.x > 0)
rect.x--;
// "don't change."
if (rect.x > 0)
rect.x--;
// Internal Helper function for computing row or column from some
// (unscrolled) coordinate value, using either
// Internal Helper function for computing row or column from some
// (unscrolled) coordinate value, using either
-// m_defaultRowHeight/m_defaultColWidth or binary search on array
+// m_defaultRowHeight/m_defaultColWidth or binary search on array
// of m_rowBottoms/m_ColRights to speed up the search!
static int CoordToRowOrCol(int coord, int defaultDist, int minDist,
// of m_rowBottoms/m_ColRights to speed up the search!
static int CoordToRowOrCol(int coord, int defaultDist, int minDist,
if ( i_max >= BorderArray.GetCount())
i_max = BorderArray.GetCount() - 1;
if ( i_max >= BorderArray.GetCount())
i_max = BorderArray.GetCount() - 1;
{
if ( coord >= BorderArray[i_max])
{
{
if ( coord >= BorderArray[i_max])
{