From 477dd8a2f67abec4446cefe8e10e07c14fd17e8d Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 22 Dec 2011 21:31:29 +0000 Subject: [PATCH] Try to preserve the value of the styles dropdown across undo/redo Originally committed to SVN as r6139. --- aegisub/src/subs_edit_box.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aegisub/src/subs_edit_box.cpp b/aegisub/src/subs_edit_box.cpp index 6c9833a60..a33d4028e 100644 --- a/aegisub/src/subs_edit_box.cpp +++ b/aegisub/src/subs_edit_box.cpp @@ -339,8 +339,10 @@ void SubsEditBox::Update(int type) { wxEventBlocker blocker(this); if (type == AssFile::COMMIT_NEW || type & AssFile::COMMIT_STYLES) { + wxString style = StyleBox->GetValue(); StyleBox->Clear(); StyleBox->Append(c->ass->GetStyles()); + StyleBox->Select(StyleBox->FindString(style)); } if (type == AssFile::COMMIT_NEW) {