X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae409cb80e53d8b1b169b2bcde3f49ce82463313..07e252a547408a8c92e7f46e545d6b46ec8ca53b:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index e643ee26b5..c23e25e96d 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2478,7 +2478,10 @@ long wxListMainWindow::HitTestLine(size_t line, int x, int y) const if ( ld->HasImage() && GetLineIconRect(line).Inside(x, y) ) return wxLIST_HITTEST_ONITEMICON; - if ( ld->HasText() ) + // VS: Testing for "ld->HasText() || InReportView()" instead of + // "ld->HasText()" is needed to make empty lines in report view + // possible + if ( ld->HasText() || InReportView() ) { wxRect rect = InReportView() ? GetLineRect(line) : GetLineLabelRect(line); @@ -2914,14 +2917,10 @@ void wxListMainWindow::EditLabel( long item ) if (m_dirty) wxSafeYield(); - wxClientDC dc(this); - PrepareDC( dc ); - wxString s = data->GetText(0); wxRect rectLabel = GetLineLabelRect(m_currentEdit); - rectLabel.x = dc.LogicalToDeviceX( rectLabel.x ); - rectLabel.y = dc.LogicalToDeviceY( rectLabel.y ); + CalcScrolledPosition(rectLabel.x, rectLabel.y, &rectLabel.x, &rectLabel.y); wxListTextCtrl *text = new wxListTextCtrl (