mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 14:27:26 +01:00
Merge pull request #804 from robhoes/starton
CA-196231: Don't confuse start-on with migration
This commit is contained in:
commit
f68c6a6cae
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (c) Citrix Systems Inc.
|
/* Copyright (c) Citrix Systems Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms,
|
* Redistribution and use in source and binary forms,
|
||||||
@ -181,7 +181,7 @@ namespace XenAdmin.Commands
|
|||||||
var firstItem = (VMOperationToolStripMenuSubItem)base.DropDownItems[0];
|
var firstItem = (VMOperationToolStripMenuSubItem)base.DropDownItems[0];
|
||||||
|
|
||||||
bool oldMigrateToHomeCmdCanRun = cmdHome.CanExecute();
|
bool oldMigrateToHomeCmdCanRun = cmdHome.CanExecute();
|
||||||
if (affinityHost == null || !oldMigrateToHomeCmdCanRun && !cpmCmdHome.CanExecute())
|
if (affinityHost == null || _operation == vm_operations.start_on || !oldMigrateToHomeCmdCanRun && !cpmCmdHome.CanExecute())
|
||||||
firstItem.Command = cmdHome;
|
firstItem.Command = cmdHome;
|
||||||
else
|
else
|
||||||
firstItem.Command = oldMigrateToHomeCmdCanRun ? cmdHome : cpmCmdHome;
|
firstItem.Command = oldMigrateToHomeCmdCanRun ? cmdHome : cpmCmdHome;
|
||||||
@ -207,7 +207,7 @@ namespace XenAdmin.Commands
|
|||||||
Program.Invoke(Program.MainWindow, delegate
|
Program.Invoke(Program.MainWindow, delegate
|
||||||
{
|
{
|
||||||
bool oldMigrateCmdCanRun = cmd.CanExecute();
|
bool oldMigrateCmdCanRun = cmd.CanExecute();
|
||||||
if (!oldMigrateCmdCanRun && !cpmCmd.CanExecute())
|
if (_operation == vm_operations.start_on || !oldMigrateCmdCanRun && !cpmCmd.CanExecute())
|
||||||
tempItem.Command = cmd;
|
tempItem.Command = cmd;
|
||||||
else
|
else
|
||||||
tempItem.Command = oldMigrateCmdCanRun ? cmd : cpmCmd;
|
tempItem.Command = oldMigrateCmdCanRun ? cmd : cpmCmd;
|
||||||
|
Loading…
Reference in New Issue
Block a user