1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-10 19:35:10 -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:
Raymond 2010-01-13 19:20:46 +00:00
parent bd948c240a
commit 6c20e1a390
2 changed files with 6 additions and 1 deletions

View File

@ -202,12 +202,14 @@ end;
procedure TScriptFrame.SynEditStatusChange(Sender: TObject;
Changes: TSynStatusChanges);
begin
{$IFDEF UpdateEditButtons}
if scSelection in changes then
begin;
Form1.TT_Cut.Enabled := SynEdit.SelAvail;
form1.TT_Copy.Enabled:= Form1.TT_Cut.Enabled;
form1.TT_Paste.Enabled:= SynEdit.CanPaste;
end;
{$ENDIF}
end;

View File

@ -23,6 +23,7 @@
unit TestUnit;
{$undef EditButtons}
{$Undef ProcessMessages} //Define this for processmessages in ThreadSafeCall
{$mode objfpc}{$H+}
@ -42,7 +43,7 @@ uses
ocr, updateform, simbasettings, reportbug;
const
SimbaVersion = 405;
SimbaVersion = 408;
type
@ -735,9 +736,11 @@ begin;
ActionCopy.Enabled:= Copy;
ActionPaste.Enabled:= Paste;
ActionDelete.Enabled:= Delete;
{$ifdef UpdateEditButtons}
TT_Cut.Enabled:= Cut;
TT_Paste.Enabled:=Paste;
TT_Copy.enabled := Copy;
{$endif}
end;
var