fix(Tutorial):修复了“编辑主界面”窗口报错、崩溃的问题(issue#1829)#1837
Merged
Conversation
HelloWRC
approved these changes
Jun 11, 2026
Member
Koharu-Mizuki
pushed a commit
to Koharu-Mizuki/ClassIsland-RB
that referenced
this pull request
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

这个 Pull Request 做了什么?
issue#1829的复现
在主界面中加入除分割线和日期外的任意一个组件后,打开教学 -> 组件编辑·入门 -> 启动“添加组件”教学,出现报错,屏幕右侧出现“组件设置”的第一条Sentence的内容,且其不被TeachingTip控件所包裹。
问题溯源
BeginTutorial的守卫IsTutorialRunning检查的是CurrentSentence != null,但在第一个StartParagraph()执行期间,CurrentSentence尚未设置(要等到StartSentence()才设置),而重入恰好在InvokeActions()阶段发生——此时IsTutorialRunning返回 false,守卫完全失效。修复
让
IsTutorialRunning的值取CurrentParagraph is not null与CurrentSentence is not null的或运算结果,确保IsTutorialRunning代表Tutorial运行的真实状态。相关 Issue
Fixes #1829
检查清单