mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 15:06:15 +02:00
* fix problem with Paste from Menu web bug #2173
This commit is contained in:
parent
dc14489292
commit
30d8d499de
@ -6647,18 +6647,22 @@ begin
|
|||||||
SelEnd.X:=length(GetDisplayText(SelEnd.Y));
|
SelEnd.X:=length(GetDisplayText(SelEnd.Y));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Enable:=((SelStart.X<>SelEnd.X) or (SelStart.Y<>SelEnd.Y)) and (Clipboard<>nil);
|
{ we change the CurCommandSet, but only if we are top view }
|
||||||
SetCmdState(ToClipCmds,Enable and (Clipboard<>@Self));
|
if ((State and sfFocused)<>0) then
|
||||||
SetCmdState(NulClipCmds,Enable);
|
begin
|
||||||
CanPaste:=(Clipboard<>nil) and ((Clipboard^.SelStart.X<>Clipboard^.SelEnd.X) or
|
Enable:=((SelStart.X<>SelEnd.X) or (SelStart.Y<>SelEnd.Y)) and (Clipboard<>nil);
|
||||||
(Clipboard^.SelStart.Y<>Clipboard^.SelEnd.Y));
|
SetCmdState(ToClipCmds,Enable and (Clipboard<>@Self));
|
||||||
SetCmdState(FromClipCmds,CanPaste and (Clipboard<>@Self));
|
SetCmdState(NulClipCmds,Enable);
|
||||||
|
CanPaste:=(Clipboard<>nil) and ((Clipboard^.SelStart.X<>Clipboard^.SelEnd.X) or
|
||||||
|
(Clipboard^.SelStart.Y<>Clipboard^.SelEnd.Y));
|
||||||
|
SetCmdState(FromClipCmds,CanPaste and (Clipboard<>@Self));
|
||||||
{$ifdef WinClipSupported}
|
{$ifdef WinClipSupported}
|
||||||
SetCmdState(FromWinClipCmds,GetTextWinClipboardSize>0);
|
SetCmdState(FromWinClipCmds,GetTextWinClipboardSize>0);
|
||||||
{$endif WinClipSupported}
|
{$endif WinClipSupported}
|
||||||
SetCmdState(UndoCmd,(GetUndoActionCount>0));
|
SetCmdState(UndoCmd,(GetUndoActionCount>0));
|
||||||
SetCmdState(RedoCmd,(GetRedoActionCount>0));
|
SetCmdState(RedoCmd,(GetRedoActionCount>0));
|
||||||
Message(Application,evBroadcast,cmCommandSetChanged,nil);
|
Message(Application,evBroadcast,cmCommandSetChanged,nil);
|
||||||
|
end;
|
||||||
DrawView;
|
DrawView;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -7250,7 +7254,10 @@ end;
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.39 2002-12-18 01:18:10 pierre
|
Revision 1.40 2003-01-21 11:03:56 pierre
|
||||||
|
* fix problem with Paste from Menu web bug 2173
|
||||||
|
|
||||||
|
Revision 1.39 2002/12/18 01:18:10 pierre
|
||||||
+ Cut/Copy/Paste added to TEditorInputLine
|
+ Cut/Copy/Paste added to TEditorInputLine
|
||||||
|
|
||||||
Revision 1.38 2002/12/17 13:48:28 pierre
|
Revision 1.38 2002/12/17 13:48:28 pierre
|
||||||
|
Loading…
Reference in New Issue
Block a user