From 105410c2a027c9fadddd64b4c52c1a665af0fc30 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sun, 2 May 2010 23:40:39 +0000 Subject: [PATCH] 2010-05-02 16:29 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/hbqt_hbqplaintextedit.cpp + Implemented: horizontally scrolled text to be selected via mouse. --- harbour/ChangeLog | 4 ++++ harbour/contrib/hbqt/hbqt_hbqplaintextedit.cpp | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5cba27b73c..0cd6e9bf63 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,10 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-05-02 16:29 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbqt/hbqt_hbqplaintextedit.cpp + + Implemented: horizontally scrolled text to be selected via mouse. + 2010-05-02 16:12 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/hbqt_hbqplaintextedit.cpp + Implemented: horizontally scrolled text to be copied. diff --git a/harbour/contrib/hbqt/hbqt_hbqplaintextedit.cpp b/harbour/contrib/hbqt/hbqt_hbqplaintextedit.cpp index 6262f886f0..45ffe5fa05 100644 --- a/harbour/contrib/hbqt/hbqt_hbqplaintextedit.cpp +++ b/harbour/contrib/hbqt/hbqt_hbqplaintextedit.cpp @@ -258,8 +258,8 @@ void HBQPlainTextEdit::mouseMoveEvent( QMouseEvent *event ) else { QTextCursor c( cursorForPosition( QPoint( 1,1 ) ) ); - rowEnds = c.blockNumber() + ( event->y() / fontMetrics().height() ); - columnEnds = event->x() / fontMetrics().averageCharWidth(); + rowEnds = c.blockNumber() + ( event->y() / fontMetrics().height() ); + columnEnds = c.columnNumber() + ( event->x() / fontMetrics().averageCharWidth() ); } update(); event->accept();