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,28 +885,33 @@ 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); ecToggleLocals : ViewDebugDialog(ddtLocals);
ecToggleLocals : ViewDebugDialog(ddtLocals); ecToggleCallStack : ViewDebugDialog(ddtCallStack);
ecToggleCallStack : ViewDebugDialog(ddtCallStack); ecToggleRegisters : ViewDebugDialog(ddtRegisters);
ecToggleRegisters : ViewDebugDialog(ddtRegisters); ecToggleAssembler : ViewDebugDialog(ddtAssembler);
ecToggleAssembler : ViewDebugDialog(ddtAssembler); ecToggleDebugEvents : ViewDebugDialog(ddtEvents);
ecToggleDebugEvents : ViewDebugDialog(ddtEvents); ecEvaluate : ViewDebugDialog(ddtEvaluate);
ecEvaluate : ViewDebugDialog(ddtEvaluate); ecInspect : ViewDebugDialog(ddtInspect);
ecInspect : ViewDebugDialog(ddtInspect); ecViewPseudoTerminal: ViewDebugDialog(ddtPseudoTerminal);
ecViewPseudoTerminal: ViewDebugDialog(ddtPseudoTerminal); ecViewThreads : ViewDebugDialog(ddtThreads);
ecViewThreads : ViewDebugDialog(ddtThreads); ecViewHistory : ViewDebugDialog(ddtHistory);
ecViewHistory : ViewDebugDialog(ddtHistory); else
end; raise Exception.CreateFmt('IDE Internal error: TDebugManager.mnuViewDebugDialogClick, wrong command parameter %d.', [xCommand]);
end; end;
end; end;