Don't pointless recreate the subs provider when the subs preview is resized
Fixes a bug that made it rather awkward to resize the style editor dialog with libass, as the libass provider briefly creates a modal dialog whenever it's created, which would interrupt the drag Originally committed to SVN as r6744.
This commit is contained in:
parent
63d60b9b1e
commit
4603a86953
1 changed files with 2 additions and 1 deletions
|
@ -135,7 +135,8 @@ void SubtitlesPreview::OnSize(wxSizeEvent &evt) {
|
|||
bmp.reset(new wxBitmap(w, h, -1));
|
||||
vid.reset(new DummyVideoProvider(0.0, 10, w, h, backColour, true));
|
||||
try {
|
||||
provider.reset(SubtitlesProviderFactory::GetProvider());
|
||||
if (!provider)
|
||||
provider.reset(SubtitlesProviderFactory::GetProvider());
|
||||
}
|
||||
catch (...) {
|
||||
wxMessageBox(
|
||||
|
|
Loading…
Reference in a new issue