From 65d027179c837f26487f02dde090aaa5d3283ae7 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Sat, 27 May 2023 08:58:23 +0300 Subject: [PATCH] Refactoring --- RhSolutions.AddIn/Controllers/RibbonController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RhSolutions.AddIn/Controllers/RibbonController.cs b/RhSolutions.AddIn/Controllers/RibbonController.cs index b5edde0..03777cc 100644 --- a/RhSolutions.AddIn/Controllers/RibbonController.cs +++ b/RhSolutions.AddIn/Controllers/RibbonController.cs @@ -84,7 +84,7 @@ public class RibbonController : ExcelRibbon public bool GetConvertEnabled(IRibbonControl control) => _workbookIsValid; public bool GetDxfEnabled(IRibbonControl control) => _workbookIsValid; - public bool GetGuessEnabled(IRibbonControl control) => RhSolutionsAddIn.Excel.ActiveWorkbook == null ? false : !_workbookIsValid; + public bool GetGuessEnabled(IRibbonControl control) => RhSolutionsAddIn.Excel.ActiveWorkbook != null && !_workbookIsValid; public bool GetExportEnabled(IRibbonControl control) {