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:
Thomas Goyne 2012-05-02 22:42:43 +00:00
parent 63d60b9b1e
commit 4603a86953

View file

@ -135,7 +135,8 @@ void SubtitlesPreview::OnSize(wxSizeEvent &evt) {
bmp.reset(new wxBitmap(w, h, -1)); bmp.reset(new wxBitmap(w, h, -1));
vid.reset(new DummyVideoProvider(0.0, 10, w, h, backColour, true)); vid.reset(new DummyVideoProvider(0.0, 10, w, h, backColour, true));
try { try {
provider.reset(SubtitlesProviderFactory::GetProvider()); if (!provider)
provider.reset(SubtitlesProviderFactory::GetProvider());
} }
catch (...) { catch (...) {
wxMessageBox( wxMessageBox(