DBG: prevent 2 double-clicks on stack entry, from opening the same file twice

git-svn-id: trunk@28982 -
This commit is contained in:
martin 2011-01-13 00:53:24 +00:00
parent 6e5ff4cb3e
commit 105bc4f759

View File

@ -360,16 +360,22 @@ begin
Entry := GetCurrentEntry; Entry := GetCurrentEntry;
if Entry = nil then Exit; if Entry = nil then Exit;
// check the full name first // avoid any process-messages, so this proc can not be re-entered (avoid opening one files many times)
Filename := Entry.FullFileName; DebugBoss.LockCommandProcessing;
if (Filename = '') or not DebugBoss.GetFullFilename(Filename, False) then try
begin // check the full name first
// if fails the check the short file name Filename := Entry.FullFileName;
Filename := Entry.Source; if (Filename = '') or not DebugBoss.GetFullFilename(Filename, False) then
if (FileName = '') or not DebugBoss.GetFullFilename(Filename, True) then begin
Exit; // if fails the check the short file name
Filename := Entry.Source;
if (FileName = '') or not DebugBoss.GetFullFilename(Filename, True) then
Exit;
end;
MainIDE.DoJumpToSourcePosition(Filename, 0, Entry.Line, 0, True, True);
finally
DebugBoss.UnLockCommandProcessing;
end; end;
MainIDE.DoJumpToSourcePosition(Filename, 0, Entry.Line, 0, True, True);
end; end;
procedure TCallStackDlg.CopyToClipBoard; procedure TCallStackDlg.CopyToClipBoard;