qt intf: fixed showing caret when FWidget got context, bug #16905

git-svn-id: trunk@30747 -
This commit is contained in:
mattias 2011-05-15 12:27:49 +00:00
parent d16f3a06da
commit 4eb05d0a4e
2 changed files with 4 additions and 3 deletions

View File

@ -31,7 +31,7 @@ unit SynEditPointClasses;
{$I synedit.inc}
{$DEFINE SynCaretDebug}
{off $DEFINE SynCaretDebug}
interface

View File

@ -28,7 +28,7 @@ unit QtCaret;
interface
{$DEFINE VerboseQtCaret}
{off $DEFINE VerboseQtCaret}
{$I qtdefines.inc}
@ -384,7 +384,8 @@ begin
{$ENDIF}
Hide;
SetWidget(AWidget);
if FCaretDirty and (AWidget <> nil) then
if (FCaretDirty or (FPixmap=nil))
and (AWidget <> nil) and (FWidget.Context<>0) then
begin
CreateCaret(FWidget, nil, FLastValidWidth, FLastValidHeight);
if (FCaretDirtyPos.X > 0) or (FCaretDirtyPos.Y > 0) then