Skip to content

Commit d382339

Browse files
Refine ribbon management and address feedback
- Added try-catch around individual panel removal in RibbonUtils. - Simplified execution logic in AddinManagerBase. - Finalized heuristic for identifying panels to remove. Co-authored-by: chuongmep <31106432+chuongmep@users.noreply.github.com>
1 parent 7cd6199 commit d382339

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

AddInManager/Model/RibbonUtils.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ public static void RemovePanels(string assemblyPath)
3838
shouldRemove = true;
3939
break;
4040
}
41-
if (button.Text != null && button.Text.Contains(assemblyName))
42-
{
43-
// dangerous, but might work
44-
}
4541
}
4642
}
4743

@@ -53,7 +49,14 @@ public static void RemovePanels(string assemblyPath)
5349

5450
foreach (var panel in panelsToRemove)
5551
{
56-
tab.Panels.Remove(panel);
52+
try
53+
{
54+
tab.Panels.Remove(panel);
55+
}
56+
catch (Exception e)
57+
{
58+
Debug.WriteLine(e);
59+
}
5760
}
5861
}
5962
}

0 commit comments

Comments
 (0)