Skip to content

Commit 54cf9cc

Browse files
WuChangingWXRIW
authored andcommitted
[fix] Prefer 32-bit, the bug about select all function
1 parent f0960c5 commit 54cf9cc

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

Ink Canvas/Ink Canvas.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,15 @@
2828
<ApplicationVersion>2.0.2.%2a</ApplicationVersion>
2929
<UseApplicationTrust>false</UseApplicationTrust>
3030
<BootstrapperEnabled>false</BootstrapperEnabled>
31+
<PlatformTarget>AnyCPU</PlatformTarget>
3132

3233
</PropertyGroup>
34+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
35+
<Prefer32Bit>True</Prefer32Bit>
36+
</PropertyGroup>
37+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
38+
<Prefer32Bit>True</Prefer32Bit>
39+
</PropertyGroup>
3340

3441

3542
<!--WinRT Reference (this is not needed so comment it)-->

Ink Canvas/MainWindow.xaml.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3855,7 +3855,15 @@ private void BtnSelect_Click(object sender, RoutedEventArgs e)
38553855
}
38563856
else
38573857
{
3858-
inkCanvas.Select(inkCanvas.Strokes);
3858+
//inkCanvas.Select(inkCanvas.Strokes);
3859+
// Fixed bug: 当通过如鼠标点击等某些方式创建没有高度或长度的笔画时,全选功能不能使用克隆、旋转、翻转、调整笔画粗细、删除功能
3860+
StrokeCollection selectedStrokes = new StrokeCollection();
3861+
foreach (Stroke stroke in inkCanvas.Strokes) {
3862+
if (stroke.GetBounds().Width > 0 && stroke.GetBounds().Height > 0) {
3863+
selectedStrokes.Add(stroke);
3864+
}
3865+
}
3866+
inkCanvas.Select(selectedStrokes);
38593867
}
38603868
}
38613869
else

0 commit comments

Comments
 (0)