mirror of https://github.com/odrling/Aegisub
Eliminate a redundant rerender of the frame when committing changes from
the visual tools. Makes all visual tools roughly twice as fast when real time mode is enabled. Originally committed to SVN as r4365.
This commit is contained in:
parent
e120ecc190
commit
6df5d97568
|
@ -264,7 +264,7 @@ void SubsEditBox::SetSplitLineMode(wxSize newSize) {
|
||||||
/// @param timeOnly
|
/// @param timeOnly
|
||||||
/// @param weak
|
/// @param weak
|
||||||
///
|
///
|
||||||
void SubsEditBox::Update (bool timeOnly,bool weak) {
|
void SubsEditBox::Update (bool timeOnly,bool weak,bool video) {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
AssDialogue *curdiag = grid->GetDialogue(linen);
|
AssDialogue *curdiag = grid->GetDialogue(linen);
|
||||||
if (curdiag) {
|
if (curdiag) {
|
||||||
|
@ -300,7 +300,7 @@ void SubsEditBox::Update (bool timeOnly,bool weak) {
|
||||||
|
|
||||||
// Video
|
// Video
|
||||||
VideoContext::Get()->curLine = curdiag;
|
VideoContext::Get()->curLine = curdiag;
|
||||||
VideoContext::Get()->UpdateDisplays(false);
|
if (video) VideoContext::Get()->UpdateDisplays(false);
|
||||||
|
|
||||||
TextEdit->EmptyUndoBuffer();
|
TextEdit->EmptyUndoBuffer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,7 +251,7 @@ public:
|
||||||
|
|
||||||
void SetSplitLineMode(wxSize size=wxSize(-1,-1));
|
void SetSplitLineMode(wxSize size=wxSize(-1,-1));
|
||||||
void CommitText(bool weak=false);
|
void CommitText(bool weak=false);
|
||||||
void Update(bool timeOnly=false,bool weak=false);
|
void Update(bool timeOnly=false,bool weak=false,bool video=true);
|
||||||
void UpdateGlobals();
|
void UpdateGlobals();
|
||||||
void SetToLine(int n,bool weak=false);
|
void SetToLine(int n,bool weak=false);
|
||||||
void UpdateFrameTiming();
|
void UpdateFrameTiming();
|
||||||
|
|
|
@ -266,7 +266,7 @@ void VisualTool<FeatureType>::Commit(bool full, wxString message) {
|
||||||
grid->ass->FlagAsModified(message);
|
grid->ass->FlagAsModified(message);
|
||||||
}
|
}
|
||||||
grid->CommitChanges(false,!full);
|
grid->CommitChanges(false,!full);
|
||||||
grid->editBox->Update(false, true);
|
grid->editBox->Update(false, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class FeatureType>
|
template<class FeatureType>
|
||||||
|
|
Loading…
Reference in New Issue