mirror of https://gitlab.com/basile.b/dexed.git
fix, copy paste cut etc broken in widget since e4656ca9e7
This commit is contained in:
parent
0cafc5b37a
commit
207e04056c
|
@ -2074,7 +2074,7 @@ object CEMainForm: TCEMainForm
|
||||||
Caption = 'Copy'
|
Caption = 'Copy'
|
||||||
ImageIndex = 4
|
ImageIndex = 4
|
||||||
OnExecute = actEdCopyExecute
|
OnExecute = actEdCopyExecute
|
||||||
OnUpdate = updateDocumentBasedAction
|
OnUpdate = updateDocEditBasedAction
|
||||||
ShortCut = 16451
|
ShortCut = 16451
|
||||||
end
|
end
|
||||||
object actEdCut: TAction
|
object actEdCut: TAction
|
||||||
|
@ -2082,7 +2082,7 @@ object CEMainForm: TCEMainForm
|
||||||
Caption = 'Cut'
|
Caption = 'Cut'
|
||||||
ImageIndex = 6
|
ImageIndex = 6
|
||||||
OnExecute = actEdCutExecute
|
OnExecute = actEdCutExecute
|
||||||
OnUpdate = updateDocumentBasedAction
|
OnUpdate = updateDocEditBasedAction
|
||||||
ShortCut = 16472
|
ShortCut = 16472
|
||||||
end
|
end
|
||||||
object actEdPaste: TAction
|
object actEdPaste: TAction
|
||||||
|
@ -2090,7 +2090,7 @@ object CEMainForm: TCEMainForm
|
||||||
Caption = 'Paste'
|
Caption = 'Paste'
|
||||||
ImageIndex = 5
|
ImageIndex = 5
|
||||||
OnExecute = actEdPasteExecute
|
OnExecute = actEdPasteExecute
|
||||||
OnUpdate = updateDocumentBasedAction
|
OnUpdate = updateDocEditBasedAction
|
||||||
ShortCut = 16470
|
ShortCut = 16470
|
||||||
end
|
end
|
||||||
object actEdUndo: TAction
|
object actEdUndo: TAction
|
||||||
|
@ -2098,7 +2098,7 @@ object CEMainForm: TCEMainForm
|
||||||
Caption = 'Undo'
|
Caption = 'Undo'
|
||||||
ImageIndex = 0
|
ImageIndex = 0
|
||||||
OnExecute = actEdUndoExecute
|
OnExecute = actEdUndoExecute
|
||||||
OnUpdate = updateDocumentBasedAction
|
OnUpdate = updateDocEditBasedAction
|
||||||
ShortCut = 16474
|
ShortCut = 16474
|
||||||
end
|
end
|
||||||
object actEdRedo: TAction
|
object actEdRedo: TAction
|
||||||
|
@ -2106,7 +2106,7 @@ object CEMainForm: TCEMainForm
|
||||||
Caption = 'Redo'
|
Caption = 'Redo'
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
OnExecute = actEdRedoExecute
|
OnExecute = actEdRedoExecute
|
||||||
OnUpdate = updateDocumentBasedAction
|
OnUpdate = updateDocEditBasedAction
|
||||||
ShortCut = 24666
|
ShortCut = 24666
|
||||||
end
|
end
|
||||||
object actEdMacStartStop: TAction
|
object actEdMacStartStop: TAction
|
||||||
|
@ -2114,7 +2114,7 @@ object CEMainForm: TCEMainForm
|
||||||
Caption = 'Start/stop macro recording'
|
Caption = 'Start/stop macro recording'
|
||||||
ImageIndex = 10
|
ImageIndex = 10
|
||||||
OnExecute = actEdMacStartStopExecute
|
OnExecute = actEdMacStartStopExecute
|
||||||
OnUpdate = updateDocumentBasedAction
|
OnUpdate = updateDocEditBasedAction
|
||||||
ShortCut = 24658
|
ShortCut = 24658
|
||||||
end
|
end
|
||||||
object actEdMacPlay: TAction
|
object actEdMacPlay: TAction
|
||||||
|
@ -2122,7 +2122,7 @@ object CEMainForm: TCEMainForm
|
||||||
Caption = 'Play macro'
|
Caption = 'Play macro'
|
||||||
ImageIndex = 11
|
ImageIndex = 11
|
||||||
OnExecute = actEdMacPlayExecute
|
OnExecute = actEdMacPlayExecute
|
||||||
OnUpdate = updateDocumentBasedAction
|
OnUpdate = updateDocEditBasedAction
|
||||||
ShortCut = 24656
|
ShortCut = 24656
|
||||||
end
|
end
|
||||||
object actFileSave: TAction
|
object actFileSave: TAction
|
||||||
|
@ -2229,7 +2229,7 @@ object CEMainForm: TCEMainForm
|
||||||
Caption = 'Indent'
|
Caption = 'Indent'
|
||||||
ImageIndex = 16
|
ImageIndex = 16
|
||||||
OnExecute = actEdIndentExecute
|
OnExecute = actEdIndentExecute
|
||||||
OnUpdate = updateDocumentBasedAction
|
OnUpdate = updateDocEditBasedAction
|
||||||
ShortCut = 24649
|
ShortCut = 24649
|
||||||
end
|
end
|
||||||
object actEdUnIndent: TAction
|
object actEdUnIndent: TAction
|
||||||
|
@ -2237,7 +2237,7 @@ object CEMainForm: TCEMainForm
|
||||||
Caption = 'Unindent'
|
Caption = 'Unindent'
|
||||||
ImageIndex = 17
|
ImageIndex = 17
|
||||||
OnExecute = actEdUnIndentExecute
|
OnExecute = actEdUnIndentExecute
|
||||||
OnUpdate = updateDocumentBasedAction
|
OnUpdate = updateDocEditBasedAction
|
||||||
ShortCut = 24661
|
ShortCut = 24661
|
||||||
end
|
end
|
||||||
object actProjOptView: TAction
|
object actProjOptView: TAction
|
||||||
|
|
|
@ -137,6 +137,7 @@ type
|
||||||
MenuItem9: TMenuItem;
|
MenuItem9: TMenuItem;
|
||||||
procedure updateDocumentBasedAction(sender: TObject);
|
procedure updateDocumentBasedAction(sender: TObject);
|
||||||
procedure updateProjectBasedAction(sender: TObject);
|
procedure updateProjectBasedAction(sender: TObject);
|
||||||
|
procedure updateDocEditBasedAction(sender: TObject);
|
||||||
procedure actFileCompileAndRunOutExecute(Sender: TObject);
|
procedure actFileCompileAndRunOutExecute(Sender: TObject);
|
||||||
procedure actEdFindExecute(Sender: TObject);
|
procedure actEdFindExecute(Sender: TObject);
|
||||||
procedure actEdFindNextExecute(Sender: TObject);
|
procedure actEdFindNextExecute(Sender: TObject);
|
||||||
|
@ -718,6 +719,14 @@ begin
|
||||||
TAction(sender).Enabled := fProject <> nil;
|
TAction(sender).Enabled := fProject <> nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEMainForm.updateDocEditBasedAction(sender: TObject);
|
||||||
|
begin
|
||||||
|
if (fDoc <> nil) and fDoc.Focused then
|
||||||
|
TAction(sender).Enabled := true
|
||||||
|
else
|
||||||
|
TAction(sender).Enabled := false;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.ActionsUpdate(AAction: TBasicAction; var Handled: Boolean);
|
procedure TCEMainForm.ActionsUpdate(AAction: TBasicAction; var Handled: Boolean);
|
||||||
begin
|
begin
|
||||||
Handled := false;
|
Handled := false;
|
||||||
|
|
Loading…
Reference in New Issue