mirror of https://gitlab.com/basile.b/dexed.git
changed the way editor messages are cleared
This commit is contained in:
parent
8aad4fba49
commit
cf4e37457f
|
@ -32,6 +32,7 @@ type
|
||||||
procedure UpdateByEvent; override;
|
procedure UpdateByEvent; override;
|
||||||
private
|
private
|
||||||
fKeyChanged: boolean;
|
fKeyChanged: boolean;
|
||||||
|
fProj: TCEProject;
|
||||||
|
|
||||||
// http://bugs.freepascal.org/view.php?id=26329
|
// http://bugs.freepascal.org/view.php?id=26329
|
||||||
fSyncEdit: TSynPluginSyncroEdit;
|
fSyncEdit: TSynPluginSyncroEdit;
|
||||||
|
@ -57,6 +58,9 @@ type
|
||||||
procedure focusedEditorChanged;
|
procedure focusedEditorChanged;
|
||||||
function getEditorHint: string;
|
function getEditorHint: string;
|
||||||
//
|
//
|
||||||
|
procedure projNew(const aProject: TCEProject); override;
|
||||||
|
procedure projClose(const aProject: TCEProject); override;
|
||||||
|
procedure projFocused(const aProject: TCEProject); override;
|
||||||
procedure projCompile(const aProject: TCEProject); override;
|
procedure projCompile(const aProject: TCEProject); override;
|
||||||
procedure projRun(const aProject: TCEProject); override;
|
procedure projRun(const aProject: TCEProject); override;
|
||||||
//
|
//
|
||||||
|
@ -248,6 +252,21 @@ begin
|
||||||
UpdateByEvent;
|
UpdateByEvent;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEEditorWidget.projNew(const aProject: TCEProject);
|
||||||
|
begin
|
||||||
|
fProj := aProject;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCEEditorWidget.projClose(const aProject: TCEProject);
|
||||||
|
begin
|
||||||
|
fProj := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCEEditorWidget.projFocused(const aProject: TCEProject);
|
||||||
|
begin
|
||||||
|
fProj := aProject;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEEditorWidget.projCompile(const aProject: TCEProject);
|
procedure TCEEditorWidget.projCompile(const aProject: TCEProject);
|
||||||
begin
|
begin
|
||||||
endUpdateByDelay;
|
endUpdateByDelay;
|
||||||
|
@ -386,7 +405,12 @@ begin
|
||||||
CEMainForm.docChangeNotify(Self, editorIndex);
|
CEMainForm.docChangeNotify(Self, editorIndex);
|
||||||
if ed.Lines.Count = 0 then exit;
|
if ed.Lines.Count = 0 then exit;
|
||||||
//
|
//
|
||||||
CEMainForm.MessageWidget.ClearMessages(mcEditor);
|
if fProj = nil then
|
||||||
|
CEMainForm.MessageWidget.ClearMessages(mcEditor)
|
||||||
|
else begin
|
||||||
|
// if the source is in proj then we want to keep messages to correct mistakes.
|
||||||
|
end;
|
||||||
|
|
||||||
lex(ed.Lines.Text, tokLst);
|
lex(ed.Lines.Text, tokLst);
|
||||||
|
|
||||||
if ed.isDSource then
|
if ed.isDSource then
|
||||||
|
|
|
@ -1047,7 +1047,6 @@ procedure TCEMainForm.actEdFindNextExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ffindwidg.actFindNextExecute(nil);
|
ffindwidg.actFindNextExecute(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
{$REGION run -------------------------------------------------------------------}
|
{$REGION run -------------------------------------------------------------------}
|
||||||
|
@ -1179,7 +1178,7 @@ var
|
||||||
i: NativeInt;
|
i: NativeInt;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
fMesgWidg.ClearMessages(mcProject);
|
fMesgWidg.ClearAllMessages;
|
||||||
|
|
||||||
for i := 0 to fWidgList.Count-1 do
|
for i := 0 to fWidgList.Count-1 do
|
||||||
fWidgList.widget[i].projCompile(aProject);
|
fWidgList.widget[i].projCompile(aProject);
|
||||||
|
|
Loading…
Reference in New Issue