IDE: view messages, view search results: do not show source editor

git-svn-id: trunk@46335 -
This commit is contained in:
mattias 2014-09-26 08:41:27 +00:00
parent bde0be3358
commit 4fa796d65d
2 changed files with 18 additions and 19 deletions

View File

@ -8112,8 +8112,10 @@ begin
exit; exit;
if Msg=nil then begin if Msg=nil then begin
// first find an error with a source position
if MessagesView.SelectFirstUrgentMessage(mluError,true) then if MessagesView.SelectFirstUrgentMessage(mluError,true) then
Msg:=MessagesView.GetSelectedLine; Msg:=MessagesView.GetSelectedLine;
// then find any error
if (Msg=nil) and MessagesView.SelectFirstUrgentMessage(mluError,false) then if (Msg=nil) and MessagesView.SelectFirstUrgentMessage(mluError,false) then
Msg:=MessagesView.GetSelectedLine; Msg:=MessagesView.GetSelectedLine;
if Msg=nil then exit; if Msg=nil then exit;
@ -8276,9 +8278,6 @@ begin
// don't move the messagesview, if it was already visible. // don't move the messagesview, if it was already visible.
IDEWindowCreators.ShowForm(MessagesView,BringToFront); IDEWindowCreators.ShowForm(MessagesView,BringToFront);
if BringToFront then
// the sourcenotebook is more interesting than the messages
SourceEditorManager.ShowActiveWindowOnTop(False);
end; end;
procedure TMainIDE.DoShowSearchResultsView(Show: boolean; BringToFront: boolean = False); procedure TMainIDE.DoShowSearchResultsView(Show: boolean; BringToFront: boolean = False);
@ -8288,10 +8287,7 @@ begin
SearchresultsView.OnSelectionChanged := OnSearchResultsViewSelectionChanged; SearchresultsView.OnSelectionChanged := OnSearchResultsViewSelectionChanged;
end; end;
if Show then begin if Show then begin
IDEWindowCreators.ShowForm(SearchresultsView,Show); IDEWindowCreators.ShowForm(SearchresultsView,BringToFront);
// the sourcenotebook is more interesting than the search results
if BringToFront = false then
SourceEditorManager.ShowActiveWindowOnTop(False);
end; end;
end; end;

View File

@ -1533,8 +1533,8 @@ var
SrcNoteBook: TSourceNotebook; SrcNoteBook: TSourceNotebook;
Layout: TSimpleWindowLayout; Layout: TSimpleWindowLayout;
begin begin
MainIDE.DoShowMessagesView(PutOnTop); if SourceEditorManager.SourceWindowCount > 0 then
if SourceEditorManager.SourceWindowCount = 0 then exit; begin
SrcNoteBook := SourceEditorManager.SourceWindows[0]; SrcNoteBook := SourceEditorManager.SourceWindows[0];
Layout:=IDEWindowCreators.SimpleLayoutStorage.ItemByFormID(SrcNoteBook.Name); Layout:=IDEWindowCreators.SimpleLayoutStorage.ItemByFormID(SrcNoteBook.Name);
@ -1546,8 +1546,11 @@ begin
begin begin
IDEWindowCreators.ShowForm(MessagesView,true); IDEWindowCreators.ShowForm(MessagesView,true);
SourceEditorManager.ShowActiveWindowOnTop(False); SourceEditorManager.ShowActiveWindowOnTop(False);
exit;
end; end;
end; end;
MainIDE.DoShowMessagesView(PutOnTop);
end;
function TLazSourceFileManager.SomethingOfProjectIsModified(Verbose: boolean): boolean; function TLazSourceFileManager.SomethingOfProjectIsModified(Verbose: boolean): boolean;
begin begin