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