2010-07-04 14:17 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
! Fixed: horizontal selection where background color was
missed by a couple of pixels to the left.
* contrib/hbide/idefindreplace.prg
! Fixed to not "find" twice if "Return" is pressed.
This commit is contained in:
@@ -1530,9 +1530,10 @@ METHOD IdeEdit:findEx( cText, nFlags, nStart )
|
||||
::qEdit:centerCursor()
|
||||
qCursor := ::getCursor()
|
||||
cT := qCursor:selectedText()
|
||||
//qCursor:clearSelection()
|
||||
::qEdit:hbSetSelectionInfo( { qCursor:blockNumber(), qCursor:columnNumber() - len( cT ), ;
|
||||
qCursor:blockNumber(), qCursor:columnNumber(), 1 } )
|
||||
::qEdit:setTextCursor( qCursor )
|
||||
//::qEdit:setTextCursor( qCursor )
|
||||
ELSE
|
||||
qCursor:setPosition( nPos )
|
||||
::qEdit:setTextCursor( qCursor )
|
||||
|
||||
@@ -251,15 +251,15 @@ METHOD IdeSearchReplace:create( oIde )
|
||||
::oUI:q_frameFind:setStyleSheet( "" )
|
||||
::oUI:q_frameReplace:setStyleSheet( "" )
|
||||
|
||||
::oUI:q_buttonClose:setIcon( ::resPath + "closetab.png" )
|
||||
::oUI:q_buttonClose:setIcon( hbide_image( "closetab" ) )
|
||||
::oUI:q_buttonClose:setToolTip( "Close" )
|
||||
::oUI:signal( "buttonClose", "clicked()", {|| ::oUI:hide() } )
|
||||
|
||||
::oUI:q_buttonNext:setIcon( ::resPath + "next.png" )
|
||||
::oUI:q_buttonNext:setIcon( hbide_image( "next" ) )
|
||||
::oUI:q_buttonNext:setToolTip( "Find Next" )
|
||||
::oUI:signal( "buttonNext", "clicked()", {|| ::find( ::cFind ), ::oIde:manageFocusInEditor() } )
|
||||
|
||||
::oUI:q_buttonPrev:setIcon( ::resPath + "previous.png" )
|
||||
::oUI:q_buttonPrev:setIcon( hbide_image( "previous" ) )
|
||||
::oUI:q_buttonPrev:setToolTip( "Find Previous" )
|
||||
::oUI:signal( "buttonPrev", "clicked()", {|| ::find( ::cFind, .t. ), ::oIde:manageFocusInEditor() } )
|
||||
|
||||
@@ -483,7 +483,6 @@ METHOD IdeFindReplace:create( oIde )
|
||||
iif( p == 1, ::oUI:q_buttonReplace:setEnabled( .f. ), NIL ) } )
|
||||
|
||||
::qLineEdit := QLineEdit():configure( ::oUI:q_comboFindWhat:lineEdit() )
|
||||
::connect( ::qLineEdit, "returnPressed()", {|| ::onClickFind() } )
|
||||
|
||||
RETURN Self
|
||||
|
||||
|
||||
@@ -1178,6 +1178,13 @@ bool HBQPlainTextEdit::hbKeyPressSelection( QKeyEvent * event )
|
||||
event->accept();
|
||||
return true;
|
||||
}
|
||||
else if( ! ctrl && k >= ' ' && k < 127 && columnBegins >= 0 && selectionMode == selectionMode_stream ) //selectionState > 0
|
||||
{
|
||||
hbCut( Qt::Key_Delete );
|
||||
hbClearSelection();
|
||||
repaint();
|
||||
selectionState = 0;
|
||||
}
|
||||
else if( isNavableKey( k ) || ( k >= ' ' && k < 127 ) )
|
||||
{
|
||||
bClear = true;
|
||||
@@ -1646,7 +1653,7 @@ void HBQPlainTextEdit::hbPaintSelection( QPaintEvent * event )
|
||||
if( rb == re )
|
||||
{
|
||||
int x = ( ( cb - c ) * fontWidth ) + marginX;
|
||||
int w = ( ce - cb ) * fontWidth;
|
||||
int w = ( ce - cb ) * fontWidth + marginX ;
|
||||
r = QRect( x, top, w, fontHeight );
|
||||
}
|
||||
else
|
||||
@@ -1672,7 +1679,7 @@ void HBQPlainTextEdit::hbPaintSelection( QPaintEvent * event )
|
||||
if( rb == re )
|
||||
{
|
||||
int x = ( ( cb - c ) * fontWidth ) + marginX;
|
||||
int w = ( ce - cb ) * fontWidth;
|
||||
int w = ( ce - cb ) * fontWidth + marginX;
|
||||
r = QRect( x, top, w, fontHeight );
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user