From 1bbec00d577bf7a0b69c9b2ca81fbda37ccbdceb Mon Sep 17 00:00:00 2001 From: Konstantina Chremmou Date: Mon, 25 Jul 2016 00:47:38 +0100 Subject: [PATCH] CA-147657: Allow setting the ToolTipText for the command ToolStripButtons and ToolStripMenuSubitems to null, otherwise the wrond text is shown for items with null can't-execute-reason that are selected after items with non-null can't execute reason. Signed-off-by: Konstantina Chremmou --- XenAdmin/Commands/Controls/CommandToolStripButton.cs | 6 ++---- .../Commands/Controls/VMOperationToolStripMenuSubItem.cs | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/XenAdmin/Commands/Controls/CommandToolStripButton.cs b/XenAdmin/Commands/Controls/CommandToolStripButton.cs index 05d056e65..16e0a13ba 100644 --- a/XenAdmin/Commands/Controls/CommandToolStripButton.cs +++ b/XenAdmin/Commands/Controls/CommandToolStripButton.cs @@ -112,10 +112,8 @@ namespace XenAdmin.Commands Image = _command.ToolBarImage; } - if (_command.ToolTipText != null) - { - ToolTipText = _command.ToolTipText; - } + //null is allowed (CA-147657) + ToolTipText = _command.ToolTipText; } } diff --git a/XenAdmin/Commands/Controls/VMOperationToolStripMenuSubItem.cs b/XenAdmin/Commands/Controls/VMOperationToolStripMenuSubItem.cs index b1ef25591..76fe7ebcb 100644 --- a/XenAdmin/Commands/Controls/VMOperationToolStripMenuSubItem.cs +++ b/XenAdmin/Commands/Controls/VMOperationToolStripMenuSubItem.cs @@ -75,10 +75,8 @@ namespace XenAdmin.Commands SecondImage = _command.SecondImage; } - if (_command.ToolTipText != null) - { - ToolTipText = _command.ToolTipText; - } + //null is allowed (CA-147657) + ToolTipText = _command.ToolTipText; StarRating = _command.StarRating; }