diff --git a/src/slic3r/GUI/wxMediaCtrl2.cpp b/src/slic3r/GUI/wxMediaCtrl2.cpp index fd683f9d7..0f8931fad 100644 --- a/src/slic3r/GUI/wxMediaCtrl2.cpp +++ b/src/slic3r/GUI/wxMediaCtrl2.cpp @@ -58,20 +58,18 @@ void wxMediaCtrl2::Load(wxURI url) BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": clsid %1% path %2%") % clsid % path; if (path.empty() || !wxFile::Exists(path) || clsid != CLSID_BAMBU_SOURCE) { - if (clsid != CLSID_BAMBU_SOURCE || path.empty()) { - std::string data_dir_str = Slic3r::data_dir(); - boost::filesystem::path data_dir_path(data_dir_str); - auto dll_path = data_dir_path / "plugins" / "BambuSource.dll"; - if (boost::filesystem::exists(dll_path)) { - Slic3r::GUI::wxGetApp().CallAfter( - [dll_path] { - int res = wxMessageBox(_L("BambuSource has not correctly been registered for media playing! Press Yes to re-register it."), _L("Error"), wxYES_NO); - if (res == wxYES) { - SHELLEXECUTEINFO info{sizeof(info), 0, NULL, L"runas", L"regsvr32", dll_path.wstring().c_str(), SW_HIDE }; - ::ShellExecuteEx(&info); - } - }); - } + std::string data_dir_str = Slic3r::data_dir(); + boost::filesystem::path data_dir_path(data_dir_str); + auto dll_path = data_dir_path / "plugins" / "BambuSource.dll"; + if (boost::filesystem::exists(dll_path)) { + Slic3r::GUI::wxGetApp().CallAfter( + [dll_path] { + int res = wxMessageBox(_L("BambuSource has not correctly been registered for media playing! Press Yes to re-register it."), _L("Error"), wxYES_NO); + if (res == wxYES) { + SHELLEXECUTEINFO info{sizeof(info), 0, NULL, L"runas", L"regsvr32", dll_path.wstring().c_str(), SW_HIDE }; + ::ShellExecuteEx(&info); + } + }); } else { Slic3r::GUI::wxGetApp().CallAfter([] { wxMessageBox(_L("Missing BambuSource component registered for media playing! Please re-install BambuStutio or seek after-sales help."), _L("Error"), wxOK);