@@ -176,6 +176,7 @@ private:
|
|||||||
// (its size is always m_numColumns)
|
// (its size is always m_numColumns)
|
||||||
wxArrayInt m_colIndices;
|
wxArrayInt m_colIndices;
|
||||||
|
|
||||||
|
bool m_wasSeparatorDClick;
|
||||||
|
|
||||||
wxDECLARE_EVENT_TABLE();
|
wxDECLARE_EVENT_TABLE();
|
||||||
wxDECLARE_NO_COPY_CLASS(wxHeaderCtrl);
|
wxDECLARE_NO_COPY_CLASS(wxHeaderCtrl);
|
||||||
|
@@ -58,6 +58,7 @@ void wxHeaderCtrl::Init()
|
|||||||
m_colBeingReordered = COL_NONE;
|
m_colBeingReordered = COL_NONE;
|
||||||
m_dragOffset = 0;
|
m_dragOffset = 0;
|
||||||
m_scrollOffset = 0;
|
m_scrollOffset = 0;
|
||||||
|
m_wasSeparatorDClick = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxHeaderCtrl::Create(wxWindow *parent,
|
bool wxHeaderCtrl::Create(wxWindow *parent,
|
||||||
@@ -611,6 +612,9 @@ void wxHeaderCtrl::OnKeyDown(wxKeyEvent& event)
|
|||||||
|
|
||||||
void wxHeaderCtrl::OnMouse(wxMouseEvent& mevent)
|
void wxHeaderCtrl::OnMouse(wxMouseEvent& mevent)
|
||||||
{
|
{
|
||||||
|
const bool wasSeparatorDClick = m_wasSeparatorDClick;
|
||||||
|
m_wasSeparatorDClick = false;
|
||||||
|
|
||||||
// do this in advance to allow simply returning if we're not interested,
|
// do this in advance to allow simply returning if we're not interested,
|
||||||
// we'll undo it if we do handle the event below
|
// we'll undo it if we do handle the event below
|
||||||
mevent.Skip();
|
mevent.Skip();
|
||||||
@@ -713,8 +717,9 @@ void wxHeaderCtrl::OnMouse(wxMouseEvent& mevent)
|
|||||||
if ( onSeparator && dblclk )
|
if ( onSeparator && dblclk )
|
||||||
{
|
{
|
||||||
evtType = wxEVT_HEADER_SEPARATOR_DCLICK;
|
evtType = wxEVT_HEADER_SEPARATOR_DCLICK;
|
||||||
|
m_wasSeparatorDClick = true;
|
||||||
}
|
}
|
||||||
else // not double click on separator
|
else if (!wasSeparatorDClick)
|
||||||
{
|
{
|
||||||
evtType = click ? wxEVT_HEADER_CLICK
|
evtType = click ? wxEVT_HEADER_CLICK
|
||||||
: wxEVT_HEADER_DCLICK;
|
: wxEVT_HEADER_DCLICK;
|
||||||
|
Reference in New Issue
Block a user