mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-15 14:29:31 +02:00
IDE, SourceEditor: Hide CodeContext hint on tab-change, minimize and app-deactivate
git-svn-id: trunk@44802 -
This commit is contained in:
parent
a37ff8d09e
commit
e4cb2bf908
@ -758,6 +758,7 @@ type
|
||||
procedure HintTimer(Sender: TObject);
|
||||
procedure HideHintTimer(Sender: TObject);
|
||||
procedure OnApplicationUserInput(Sender: TObject; Msg: Cardinal);
|
||||
procedure OnApplicationDeactivate(Sender: TObject);
|
||||
procedure ShowSynEditHint(const MousePos: TPoint);
|
||||
|
||||
procedure NextEditor;
|
||||
@ -5739,6 +5740,8 @@ begin
|
||||
CreateNotebook;
|
||||
|
||||
Application.AddOnUserInputHandler(@OnApplicationUserInput,true);
|
||||
Application.AddOnDeactivateHandler(@OnApplicationDeactivate);
|
||||
Application.AddOnMinimizeHandler(@OnApplicationDeactivate);
|
||||
|
||||
FStopBtnIdx := IDEImages.LoadImage(16, 'menu_stop');
|
||||
end;
|
||||
@ -5760,6 +5763,8 @@ begin
|
||||
FreeAndNil(FSrcEditsSortedForFilenames);
|
||||
|
||||
Application.RemoveOnUserInputHandler(@OnApplicationUserInput);
|
||||
Application.RemoveOnDeactivateHandler(@OnApplicationDeactivate);
|
||||
Application.RemoveOnMinimizeHandler(@OnApplicationDeactivate);
|
||||
FreeThenNil(FMouseHintTimer);
|
||||
FreeThenNil(FMouseHideHintTimer);
|
||||
FreeThenNil(FHintWindow);
|
||||
@ -8055,6 +8060,8 @@ Begin
|
||||
SrcEdit:=GetActiveSE;
|
||||
if (FHintWindow <> nil) and FHintWindow.Visible then
|
||||
HideHint;
|
||||
if (CodeContextFrm<>nil) then
|
||||
CodeContextFrm.Hide;
|
||||
|
||||
DebugLn(SRCED_PAGES, ['TSourceNotebook.NotebookPageChanged TempEdit=', DbgSName(SrcEdit), ' Vis=', dbgs(IsVisible), ' Hnd=', dbgs(HandleAllocated)]);
|
||||
if SrcEdit <> nil then
|
||||
@ -8460,6 +8467,12 @@ begin
|
||||
HideHint;
|
||||
end;
|
||||
|
||||
procedure TSourceNotebook.OnApplicationDeactivate(Sender: TObject);
|
||||
begin
|
||||
if (CodeContextFrm<>nil) then
|
||||
CodeContextFrm.Hide;
|
||||
end;
|
||||
|
||||
procedure TSourceNotebook.EditorKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user