From bb338401856899d3f9e1506d31b00f1fb6b541ff Mon Sep 17 00:00:00 2001 From: Serghei Cebotari Date: Thu, 14 Nov 2024 00:16:03 +0300 Subject: [PATCH] Subscribe to deactivate workbook event --- RhSolutions.AddIn/Tools/EventsUtil.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RhSolutions.AddIn/Tools/EventsUtil.cs b/RhSolutions.AddIn/Tools/EventsUtil.cs index 31063e4..a32dc47 100644 --- a/RhSolutions.AddIn/Tools/EventsUtil.cs +++ b/RhSolutions.AddIn/Tools/EventsUtil.cs @@ -10,6 +10,7 @@ internal static class EventsUtil RhSolutionsAddIn.Excel.SheetSelectionChange += RefreshExportButton; RhSolutionsAddIn.Excel.SheetActivate += RefreshButtons; RhSolutionsAddIn.Excel.WorkbookActivate += RefreshButtons; + RhSolutionsAddIn.Excel.WorkbookDeactivate += RefreshButtons; RhSolutionsAddIn.Configuration.OnSettingsChange += RefreshSettingTitle; } @@ -18,6 +19,7 @@ internal static class EventsUtil RhSolutionsAddIn.Excel.SheetSelectionChange -= RefreshExportButton; RhSolutionsAddIn.Excel.SheetActivate -= RefreshButtons; RhSolutionsAddIn.Excel.WorkbookActivate -= RefreshButtons; + RhSolutionsAddIn.Excel.WorkbookDeactivate -= RefreshButtons; RhSolutionsAddIn.Configuration.OnSettingsChange -= RefreshSettingTitle; }