Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
vczh committed Apr 2, 2018
1 parent 2826764 commit 2db94e4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Import/GacUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25697,7 +25697,7 @@ GuiGeneralUndoRedoProcessor
{
steps.Clear();
firstFutureStep=0;
savedStep=-1;
savedStep=0;
}
}

Expand Down
4 changes: 2 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ https://zhuanlan.zhihu.com/p/33778843
- [x] Demo: Direct2DClock
- [x] Demo: Responsive1
- [x] Demo: Responsive2
- [ ] Demo: TextEditor
- [x] Demo: TextEditor
- [x] Use toolstrip group instead of splitter
- [ ] Recently opened files in both menu and toolbar
- [x] Recently opened files in both menu and toolbar
- [x] Prevent from crashing while binding to a.b.c if a.b is null with a.b.cChanged exists
- [ ] **Update Release**
- [ ] Demo: TriplePhaseImageButton
Expand Down
13 changes: 10 additions & 3 deletions Tutorial/GacUI_Controls/TextEditor/UI/Source/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ namespace demo
textBox->SetText(reader.ReadToEnd());
textBox->Select(TextPos(), TextPos());
textBox->SetFocus();
textBox->ClearUndoRedo();

fileName = dialogOpen->GetFileName();
if (INVLOC.EndsWith(fileName, L".xml", Locale::IgnoreCase))
Expand All @@ -81,8 +82,10 @@ namespace demo
SetupTextConfig();
}

textBox->ClearUndoRedo();
AddRecentFile(path);
GetApplication()->InvokeInMainThread(this, [=]()
{
AddRecentFile(path);
});
return true;
}
else
Expand Down Expand Up @@ -147,7 +150,11 @@ namespace demo
{
SetupTextConfig();
}
AddRecentFile(targetFileName);

GetApplication()->InvokeInMainThread(this, [=]()
{
AddRecentFile(targetFileName);
});
return true;
}
else
Expand Down

0 comments on commit 2db94e4

Please sign in to comment.