2010-05-02 16:12 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* contrib/hbqt/hbqt_hbqplaintextedit.cpp
    + Implemented: horizontally scrolled text to be copied.
      So now it is identical to xMate in all respects plus 
      selection through mouse as properitory to hbIDE.
This commit is contained in:
Pritpal Bedi
2010-05-02 23:15:54 +00:00
parent 7bbe198d8b
commit 3b6b91f441
2 changed files with 9 additions and 2 deletions

View File

@@ -17,7 +17,13 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-05-02 03:00 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
2010-05-02 16:12 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
+ Implemented: horizontally scrolled text to be copied.
So now it is identical to xMate in all respects plus
selection through mouse as properitory to hbIDE.
2010-05-02 15:00 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
* contrib/hbqt/hbqt_hbqplaintextedit.h

View File

@@ -782,13 +782,14 @@ void HBQPlainTextEdit::hbPaintColumnSelection( QPaintEvent * event )
int t = cursorForPosition( QPoint( 1, 1 ) ).blockNumber();
if( rowEnds < rowBegins ? rowBegins >= t : rowEnds >= t )
{
int c = cursorForPosition( QPoint( 1, 1 ) ).columnNumber();
QRect cr = contentsRect();
int y = ( ( rowBegins <= t ) ? 0 : ( ( rowBegins - t ) * fontMetrics().height() ) );
int fontWidth = fontMetrics().averageCharWidth();
int x = ( columnBegins ) * fontWidth + cr.left();
int x = ( ( columnBegins - c ) * fontWidth ) + cr.left();
int w = ( columnEnds - columnBegins ) * fontWidth;
QRect r( x, y, ( w == 0 ? 1 : w ), ( ( rowEnds - t + 1 ) * fontMetrics().height() ) - y );