IDE: fixed debugger menu commands.

git-svn-id: trunk@50198 -
This commit is contained in:
ondrej 2015-10-29 11:52:52 +00:00
parent e3749487a9
commit 1c6348c711

View File

@ -885,14 +885,18 @@ begin
end; end;
procedure TDebugManager.mnuViewDebugDialogClick(Sender: TObject); procedure TDebugManager.mnuViewDebugDialogClick(Sender: TObject);
var
xCommand: Integer;
begin begin
if Sender is TIDEMenuItem if (Sender is TIDESpecialCommand) and (TIDESpecialCommand(Sender).Command<>nil) then
then begin xCommand := TIDESpecialCommand(Sender).Command.Command
ViewDebugDialog(TDebugDialogType((Sender as TIDEMenuItem).Tag)); else
end; if Sender is TIDECommand then
xCommand := TIDECommand(Sender).Command
else
xCommand := -1;
if Sender is TIDECommand then begin case xCommand of
case TIDECommand(Sender).Command of
ecToggleWatches : ViewDebugDialog(ddtWatches); ecToggleWatches : ViewDebugDialog(ddtWatches);
ecToggleBreakPoints : ViewDebugDialog(ddtBreakpoints); ecToggleBreakPoints : ViewDebugDialog(ddtBreakpoints);
ecToggleDebuggerOut : ViewDebugDialog(ddtOutput); ecToggleDebuggerOut : ViewDebugDialog(ddtOutput);
@ -906,7 +910,8 @@ begin
ecViewPseudoTerminal: ViewDebugDialog(ddtPseudoTerminal); ecViewPseudoTerminal: ViewDebugDialog(ddtPseudoTerminal);
ecViewThreads : ViewDebugDialog(ddtThreads); ecViewThreads : ViewDebugDialog(ddtThreads);
ecViewHistory : ViewDebugDialog(ddtHistory); ecViewHistory : ViewDebugDialog(ddtHistory);
end; else
raise Exception.CreateFmt('IDE Internal error: TDebugManager.mnuViewDebugDialogClick, wrong command parameter %d.', [xCommand]);
end; end;
end; end;