diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 7c6c06584c..28942849b9 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2449,10 +2449,24 @@ wxRect wxListMainWindow::GetLineLabelRect(size_t line) const if ( !InReportView() ) return GetLine(line)->m_gi->m_rectLabel; + int image_x = 0; + wxListLineData *data = GetLine(line); + wxListItemDataList::compatibility_iterator node = data->m_items.GetFirst(); + if (node) + { + wxListItemData *item = node->GetData(); + if ( item->HasImage() ) + { + int ix, iy; + GetImageSize( item->GetImage(), ix, iy ); + image_x = 3 + ix + IMAGE_MARGIN_IN_REPORT_MODE; + } + } + wxRect rect; - rect.x = HEADER_OFFSET_X; + rect.x = image_x + HEADER_OFFSET_X; rect.y = GetLineY(line); - rect.width = GetColumnWidth(0); + rect.width = GetColumnWidth(0) - image_x; rect.height = GetLineHeight(); return rect; @@ -3142,7 +3156,15 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) (hitResult == wxLIST_HITTEST_ONITEMLABEL) && HasFlag(wxLC_EDIT_LABELS) ) { - m_renameTimer->Start( 100, true ); + if (InReportView()) + { + wxRect label = GetLineLabelRect( current ); + if (label.Contains( x, y )) + m_renameTimer->Start( 250, true ); + + } + else + m_renameTimer->Start( 250, true ); } } diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 2209b0648e..7d557dee38 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -74,7 +74,7 @@ class WXDLLEXPORT wxTreeRenameTimer: public wxTimer public: // start editing the current item after half a second (if the mouse hasn't // been clicked/moved) - enum { DELAY = 500 }; + enum { DELAY = 250 }; wxTreeRenameTimer( wxGenericTreeCtrl *owner );