mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-22 09:12:19 -05:00
The Editbuttons in the Toolbar(copy/cut/paste) cannot be updated to keep track of whether something is highlighted in Synedit.
Define UpdateEdittButons to make it do so (but cause lag) git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@410 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
bd948c240a
commit
6c20e1a390
@ -202,12 +202,14 @@ end;
|
|||||||
procedure TScriptFrame.SynEditStatusChange(Sender: TObject;
|
procedure TScriptFrame.SynEditStatusChange(Sender: TObject;
|
||||||
Changes: TSynStatusChanges);
|
Changes: TSynStatusChanges);
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF UpdateEditButtons}
|
||||||
if scSelection in changes then
|
if scSelection in changes then
|
||||||
begin;
|
begin;
|
||||||
Form1.TT_Cut.Enabled := SynEdit.SelAvail;
|
Form1.TT_Cut.Enabled := SynEdit.SelAvail;
|
||||||
form1.TT_Copy.Enabled:= Form1.TT_Cut.Enabled;
|
form1.TT_Copy.Enabled:= Form1.TT_Cut.Enabled;
|
||||||
form1.TT_Paste.Enabled:= SynEdit.CanPaste;
|
form1.TT_Paste.Enabled:= SynEdit.CanPaste;
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
unit TestUnit;
|
unit TestUnit;
|
||||||
|
|
||||||
|
{$undef EditButtons}
|
||||||
{$Undef ProcessMessages} //Define this for processmessages in ThreadSafeCall
|
{$Undef ProcessMessages} //Define this for processmessages in ThreadSafeCall
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ uses
|
|||||||
ocr, updateform, simbasettings, reportbug;
|
ocr, updateform, simbasettings, reportbug;
|
||||||
|
|
||||||
const
|
const
|
||||||
SimbaVersion = 405;
|
SimbaVersion = 408;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -735,9 +736,11 @@ begin;
|
|||||||
ActionCopy.Enabled:= Copy;
|
ActionCopy.Enabled:= Copy;
|
||||||
ActionPaste.Enabled:= Paste;
|
ActionPaste.Enabled:= Paste;
|
||||||
ActionDelete.Enabled:= Delete;
|
ActionDelete.Enabled:= Delete;
|
||||||
|
{$ifdef UpdateEditButtons}
|
||||||
TT_Cut.Enabled:= Cut;
|
TT_Cut.Enabled:= Cut;
|
||||||
TT_Paste.Enabled:=Paste;
|
TT_Paste.Enabled:=Paste;
|
||||||
TT_Copy.enabled := Copy;
|
TT_Copy.enabled := Copy;
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user