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:
Pritpal Bedi
2010-07-04 21:23:24 +00:00
parent 77cb828eab
commit eef431c55a
3 changed files with 14 additions and 7 deletions

View File

@@ -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 )

View File

@@ -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

View File

@@ -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