fix:issue #170
This commit is contained in:
@@ -205,6 +205,11 @@ namespace Ink_Canvas
|
||||
// 提交到历史记录
|
||||
timeMachine.CommitElementInsertHistory(image);
|
||||
|
||||
// 插入图片后切换到选择模式并刷新浮动栏高光显示
|
||||
SetCurrentToolMode(InkCanvasEditingMode.Select);
|
||||
UpdateCurrentToolMode("select");
|
||||
HideSubPanels("select");
|
||||
|
||||
ShowNotification("图片已从剪贴板粘贴");
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -68,6 +68,11 @@ namespace Ink_Canvas
|
||||
};
|
||||
|
||||
timeMachine.CommitElementInsertHistory(image);
|
||||
|
||||
// 插入图片后切换到选择模式并刷新浮动栏高光显示
|
||||
SetCurrentToolMode(InkCanvasEditingMode.Select);
|
||||
UpdateCurrentToolMode("select");
|
||||
HideSubPanels("select");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1851,6 +1851,13 @@ namespace Ink_Canvas
|
||||
((Panel)lastBorderMouseDownObject).Background = new SolidColorBrush(Colors.Transparent);
|
||||
if (sender == Pen_Icon && lastBorderMouseDownObject != Pen_Icon) return;
|
||||
|
||||
// 如果当前有选中的图片元素,先取消选中
|
||||
if (currentSelectedElement != null)
|
||||
{
|
||||
UnselectElement(currentSelectedElement);
|
||||
currentSelectedElement = null;
|
||||
}
|
||||
|
||||
// 禁用高级橡皮擦系统
|
||||
DisableAdvancedEraserSystem();
|
||||
|
||||
@@ -3099,6 +3106,11 @@ namespace Ink_Canvas
|
||||
}
|
||||
|
||||
timeMachine.CommitElementInsertHistory(image);
|
||||
|
||||
// 插入图片后切换到选择模式并刷新浮动栏高光显示
|
||||
SetCurrentToolMode(InkCanvasEditingMode.Select);
|
||||
UpdateCurrentToolMode("select");
|
||||
HideSubPanels("select");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3165,6 +3177,11 @@ namespace Ink_Canvas
|
||||
}
|
||||
|
||||
timeMachine.CommitElementInsertHistory(image);
|
||||
|
||||
// 插入图片后切换到选择模式并刷新浮动栏高光显示
|
||||
SetCurrentToolMode(InkCanvasEditingMode.Select);
|
||||
UpdateCurrentToolMode("select");
|
||||
HideSubPanels("select");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3231,6 +3248,11 @@ namespace Ink_Canvas
|
||||
}
|
||||
|
||||
timeMachine.CommitElementInsertHistory(image);
|
||||
|
||||
// 插入图片后切换到选择模式并刷新浮动栏高光显示
|
||||
SetCurrentToolMode(InkCanvasEditingMode.Select);
|
||||
UpdateCurrentToolMode("select");
|
||||
HideSubPanels("select");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,6 +216,11 @@ namespace Ink_Canvas
|
||||
// 提交历史记录
|
||||
timeMachine.CommitElementInsertHistory(image);
|
||||
|
||||
// 插入图片后切换到选择模式并刷新浮动栏高光显示
|
||||
SetCurrentToolMode(InkCanvasEditingMode.Select);
|
||||
UpdateCurrentToolMode("select");
|
||||
HideSubPanels("select");
|
||||
|
||||
ShowNotification("截图已插入到画布");
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -336,7 +336,7 @@ namespace Ink_Canvas
|
||||
{
|
||||
var borderLeft = (inkCanvas.GetSelectionBounds().Left + inkCanvas.GetSelectionBounds().Right -
|
||||
BorderStrokeSelectionControlWidth) / 2;
|
||||
var borderTop = inkCanvas.GetSelectionBounds().Bottom + 1;
|
||||
var borderTop = inkCanvas.GetSelectionBounds().Bottom + 10; // 在墨迹下方10像素处显示
|
||||
if (borderLeft < 0) borderLeft = 0;
|
||||
if (borderTop < 0) borderTop = 0;
|
||||
if (Width - borderLeft < BorderStrokeSelectionControlWidth || double.IsNaN(borderLeft))
|
||||
@@ -344,7 +344,14 @@ namespace Ink_Canvas
|
||||
if (Height - borderTop < BorderStrokeSelectionControlHeight || double.IsNaN(borderTop))
|
||||
borderTop = Height - BorderStrokeSelectionControlHeight;
|
||||
|
||||
if (borderTop > 60) borderTop -= 60;
|
||||
// 确保墨迹选中栏始终显示在墨迹下方
|
||||
// 如果选中栏会超出屏幕底部,则显示在墨迹上方
|
||||
if (borderTop + BorderStrokeSelectionControlHeight > Height)
|
||||
{
|
||||
borderTop = inkCanvas.GetSelectionBounds().Top - BorderStrokeSelectionControlHeight - 10;
|
||||
if (borderTop < 0) borderTop = 10; // 如果上方也没有空间,则显示在顶部
|
||||
}
|
||||
|
||||
BorderStrokeSelectionControl.Margin = new Thickness(borderLeft, borderTop, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +118,13 @@ namespace Ink_Canvas
|
||||
|
||||
private void BtnPen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// 如果当前有选中的图片元素,先取消选中
|
||||
if (currentSelectedElement != null)
|
||||
{
|
||||
UnselectElement(currentSelectedElement);
|
||||
currentSelectedElement = null;
|
||||
}
|
||||
|
||||
// 禁用高级橡皮擦系统
|
||||
DisableAdvancedEraserSystem();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user