2012-01-31 17:56 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp
    ! Fixed: a long standing mis-behavior where K_END was not 
       working as expected in column-selection mode.
This commit is contained in:
Pritpal Bedi
2012-02-01 01:58:39 +00:00
parent d329122720
commit 6c3390e4cf
2 changed files with 12 additions and 12 deletions

View File

@@ -16,6 +16,11 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-01-31 17:56 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp
! Fixed: a long standing mis-behavior where K_END was not
working as expected in column-selection mode.
2012-02-01 00:50 UTC+0100 Viktor Szakats (harbour syenar.net)
* ChangeLog
! added 'incompatible' flag to recent hbhttpd changelog entry

View File

@@ -1012,6 +1012,7 @@ bool HBQPlainTextEdit::hbKeyPressSelectionByApplication( QKeyEvent * event )
}
else if( selectionMode == selectionMode_column )
{
HB_TRACE( HB_TR_ALWAYS, ( "HAHAHAHAHAH" ) );
switch( k )
{
case Qt::Key_Right:
@@ -1050,6 +1051,10 @@ bool HBQPlainTextEdit::hbKeyPressSelectionByApplication( QKeyEvent * event )
}
case Qt::Key_End:
{
QPlainTextEdit::keyPressEvent( event );
columnEnds = textCursor().columnNumber();
break;
#if 0
QTextCursor c( textCursor() );
c.movePosition( QTextCursor::EndOfLine, QTextCursor::MoveAnchor );
if( c.columnNumber() <= columnEnds )
@@ -1062,6 +1067,7 @@ bool HBQPlainTextEdit::hbKeyPressSelectionByApplication( QKeyEvent * event )
event->ignore();
}
break;
#endif
}
case Qt::Key_Up:
case Qt::Key_PageUp:
@@ -1211,23 +1217,12 @@ bool HBQPlainTextEdit::hbKeyPressSelection( QKeyEvent * event )
break;
}
case Qt::Key_Home:
case Qt::Key_End:
{
QPlainTextEdit::keyPressEvent( event );
columnEnds = textCursor().columnNumber();
break;
}
case Qt::Key_End:
{
QTextCursor c( textCursor() );
c.movePosition( QTextCursor::EndOfLine, QTextCursor::MoveAnchor );
if( c.columnNumber() <= columnEnds ){
QPlainTextEdit::keyPressEvent( event );
columnEnds = textCursor().columnNumber();;
} else {
event->ignore();
}
break;
}
case Qt::Key_Up:
case Qt::Key_PageUp:
case Qt::Key_Down: