Skip to content

Commit

Permalink
[fix] Prefer 32-bit, the bug about select all function
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangSakura authored and WXRIW committed Mar 14, 2024
1 parent f0960c5 commit 54cf9cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Ink Canvas/Ink Canvas.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,15 @@
<ApplicationVersion>2.0.2.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>false</BootstrapperEnabled>
<PlatformTarget>AnyCPU</PlatformTarget>

</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<Prefer32Bit>True</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Prefer32Bit>True</Prefer32Bit>
</PropertyGroup>


<!--WinRT Reference (this is not needed so comment it)-->
Expand Down
10 changes: 9 additions & 1 deletion Ink Canvas/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3855,7 +3855,15 @@ private void BtnSelect_Click(object sender, RoutedEventArgs e)
}
else
{
inkCanvas.Select(inkCanvas.Strokes);
//inkCanvas.Select(inkCanvas.Strokes);
// Fixed bug: 当通过如鼠标点击等某些方式创建没有高度或长度的笔画时,全选功能不能使用克隆、旋转、翻转、调整笔画粗细、删除功能
StrokeCollection selectedStrokes = new StrokeCollection();
foreach (Stroke stroke in inkCanvas.Strokes) {
if (stroke.GetBounds().Width > 0 && stroke.GetBounds().Height > 0) {
selectedStrokes.Add(stroke);
}
}
inkCanvas.Select(selectedStrokes);
}
}
else
Expand Down

0 comments on commit 54cf9cc

Please sign in to comment.