fix:进退白板墨迹消失
This commit is contained in:
@@ -1333,14 +1333,10 @@ namespace Ink_Canvas {
|
|||||||
|
|
||||||
if (currentMode != 0) {
|
if (currentMode != 0) {
|
||||||
SaveStrokes();
|
SaveStrokes();
|
||||||
// 检查是否在PPT放映模式,如果不在则不恢复可能包含PPT墨迹的备份
|
// 总是恢复备份墨迹,不管是否在PPT模式
|
||||||
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) {
|
// PPT墨迹和白板墨迹应该分别管理,不应该互相影响
|
||||||
RestoreStrokes(true);
|
RestoreStrokes(true);
|
||||||
} else {
|
LogHelper.WriteLogToFile($"退出白板模式,恢复备份墨迹。当前模式:{(BtnPPTSlideShowEnd.Visibility == Visibility.Visible ? "PPT放映" : "桌面")}", LogHelper.LogType.Trace);
|
||||||
// 不在PPT模式时,清空备份以避免显示已结束PPT的墨迹
|
|
||||||
TimeMachineHistories[0] = null;
|
|
||||||
timeMachine.ClearStrokeHistory();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BtnSwitchTheme.Content.ToString() == "浅色")
|
if (BtnSwitchTheme.Content.ToString() == "浅色")
|
||||||
@@ -1795,16 +1791,10 @@ namespace Ink_Canvas {
|
|||||||
SaveStrokes(true);
|
SaveStrokes(true);
|
||||||
ClearStrokes(true);
|
ClearStrokes(true);
|
||||||
|
|
||||||
// 检查是否在PPT放映模式,如果不在则不恢复可能包含PPT墨迹的备份
|
// 总是恢复备份墨迹,不管是否在PPT模式
|
||||||
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) {
|
// PPT墨迹和白板墨迹应该分别管理,不应该互相影响
|
||||||
LogHelper.WriteLogToFile("退出白板:当前在PPT放映模式,恢复备份墨迹", LogHelper.LogType.Trace);
|
RestoreStrokes();
|
||||||
RestoreStrokes();
|
LogHelper.WriteLogToFile($"退出白板模式,恢复备份墨迹。当前模式:{(BtnPPTSlideShowEnd.Visibility == Visibility.Visible ? "PPT放映" : "桌面")}", LogHelper.LogType.Trace);
|
||||||
} else {
|
|
||||||
// 不在PPT模式时,清空备份以避免显示已结束PPT的墨迹
|
|
||||||
LogHelper.WriteLogToFile("退出白板:当前不在PPT放映模式,清空备份以避免显示已结束PPT的墨迹", LogHelper.LogType.Trace);
|
|
||||||
TimeMachineHistories[0] = null;
|
|
||||||
timeMachine.ClearStrokeHistory();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 退出白板时清空图片
|
// 退出白板时清空图片
|
||||||
inkCanvas.Children.Clear();
|
inkCanvas.Children.Clear();
|
||||||
@@ -1846,14 +1836,10 @@ namespace Ink_Canvas {
|
|||||||
SaveStrokes();
|
SaveStrokes();
|
||||||
ClearStrokes(true);
|
ClearStrokes(true);
|
||||||
|
|
||||||
// 检查是否在PPT放映模式,如果不在则不恢复可能包含PPT墨迹的备份
|
// 总是恢复备份墨迹,不管是否在PPT模式
|
||||||
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) {
|
// PPT墨迹和白板墨迹应该分别管理,不应该互相影响
|
||||||
RestoreStrokes(true);
|
RestoreStrokes(true);
|
||||||
} else {
|
LogHelper.WriteLogToFile($"切换到桌面模式,恢复备份墨迹。当前模式:{(BtnPPTSlideShowEnd.Visibility == Visibility.Visible ? "PPT放映" : "桌面")}", LogHelper.LogType.Trace);
|
||||||
// 不在PPT模式时,清空备份以避免显示已结束PPT的墨迹
|
|
||||||
TimeMachineHistories[0] = null;
|
|
||||||
timeMachine.ClearStrokeHistory();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 退出白板时清空图片
|
// 退出白板时清空图片
|
||||||
inkCanvas.Children.Clear();
|
inkCanvas.Children.Clear();
|
||||||
@@ -1891,14 +1877,10 @@ namespace Ink_Canvas {
|
|||||||
SaveStrokes(true);
|
SaveStrokes(true);
|
||||||
ClearStrokes(true);
|
ClearStrokes(true);
|
||||||
|
|
||||||
// 检查是否在PPT放映模式,如果不在则不恢复可能包含PPT墨迹的备份
|
// 总是恢复备份墨迹,不管是否在PPT模式
|
||||||
if (BtnPPTSlideShowEnd.Visibility == Visibility.Visible) {
|
// PPT墨迹和白板墨迹应该分别管理,不应该互相影响
|
||||||
RestoreStrokes();
|
RestoreStrokes();
|
||||||
} else {
|
LogHelper.WriteLogToFile($"进入白板模式,恢复备份墨迹。当前模式:{(BtnPPTSlideShowEnd.Visibility == Visibility.Visible ? "PPT放映" : "桌面")}", LogHelper.LogType.Trace);
|
||||||
// 不在PPT模式时,清空备份以避免显示已结束PPT的墨迹
|
|
||||||
TimeMachineHistories[0] = null;
|
|
||||||
timeMachine.ClearStrokeHistory();
|
|
||||||
}
|
|
||||||
|
|
||||||
BtnSwitch.Content = "屏幕";
|
BtnSwitch.Content = "屏幕";
|
||||||
if (BtnSwitchTheme.Content.ToString() == "浅色") {
|
if (BtnSwitchTheme.Content.ToString() == "浅色") {
|
||||||
|
|||||||
@@ -391,6 +391,8 @@ namespace Ink_Canvas {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClearStrokes(true);
|
ClearStrokes(true);
|
||||||
|
// 清空备份历史记录,防止退出白板时恢复已结束PPT的墨迹
|
||||||
|
// 注意:这里只清空索引0的备份,不影响白板页面的墨迹(索引1及以上)
|
||||||
TimeMachineHistories[0] = null;
|
TimeMachineHistories[0] = null;
|
||||||
|
|
||||||
if (GridTransparencyFakeBackground.Background != Brushes.Transparent)
|
if (GridTransparencyFakeBackground.Background != Brushes.Transparent)
|
||||||
|
|||||||
Reference in New Issue
Block a user