add wxSYS_DCLICK_TIME system metric constant; use it for the generic list control rename timer interval (patch 1782472)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-09-09 22:57:12 +00:00
parent 5bc3ef05b8
commit 5595181f48
6 changed files with 24 additions and 9 deletions

View File

@@ -42,6 +42,7 @@
#include "wx/dcclient.h"
#include "wx/dcscreen.h"
#include "wx/math.h"
#include "wx/settings.h"
#endif
#include "wx/imaglist.h"
@@ -3154,15 +3155,12 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
(hitResult == wxLIST_HITTEST_ONITEMLABEL) &&
HasFlag(wxLC_EDIT_LABELS) )
{
if (InReportView())
if ( !InReportView() ||
GetLineLabelRect(current).Contains(x, y) )
{
wxRect label = GetLineLabelRect( current );
if (label.Contains( x, y ))
m_renameTimer->Start( 250, true );
int dclick = wxSystemSettings::GetMetric(wxSYS_DCLICK_MSEC);
m_renameTimer->Start(dclick > 0 ? dclick : 250, true);
}
else
m_renameTimer->Start( 250, true );
}
}