fix:插入图片子面板折叠问题

This commit is contained in:
2025-08-30 18:59:32 +08:00
parent 7beb2a3cc5
commit 636769c0ef
@@ -2776,17 +2776,20 @@ namespace Ink_Canvas
private void InsertImageOptions_MouseUp(object sender, MouseButtonEventArgs e) private void InsertImageOptions_MouseUp(object sender, MouseButtonEventArgs e)
{ {
// Hide other sub-panels first // Check if the image options panel is currently visible
HideSubPanelsImmediately(); bool isImagePanelVisible = BoardImageOptionsPanel.Visibility == Visibility.Visible;
// Show the image options panel // Toggle the image options panel
if (BoardImageOptionsPanel.Visibility == Visibility.Collapsed) if (isImagePanelVisible)
{ {
AnimationsHelper.ShowWithSlideFromBottomAndFade(BoardImageOptionsPanel); // Panel was visible, so hide it with animation
AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel);
} }
else else
{ {
AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel); // Panel was hidden, so hide other panels and show this one
HideSubPanelsImmediately();
AnimationsHelper.ShowWithSlideFromBottomAndFade(BoardImageOptionsPanel);
} }
} }