mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 20:28:08 -06:00
FIX: [STUDIO-3090] export error string to file panel
Change-Id: Ifabff9646dfcf19da9188edfb2447b33c8c1089e
This commit is contained in:
parent
75545c65cd
commit
10988f0bae
2 changed files with 8 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
#include "libslic3r/Utils.hpp"
|
||||
#include "libslic3r/Format/bbs_3mf.hpp"
|
||||
#include "libslic3r/Model.hpp"
|
||||
#include "slic3r/GUI/I18N.hpp"
|
||||
|
||||
#include "../../Utils/NetworkAgent.hpp"
|
||||
#include "../BitmapCache.hpp"
|
||||
|
@ -29,6 +30,10 @@ wxDEFINE_EVENT(EVT_FILE_CALLBACK, wxCommandEvent);
|
|||
|
||||
static wxBitmap default_thumbnail;
|
||||
|
||||
static std::map<int, std::string> error_messages = {
|
||||
{PrinterFileSystem::FILE_TYPE_ERR, L("Not supported on the current printer version.")}
|
||||
};
|
||||
|
||||
struct StaticBambuLib : BambuLib {
|
||||
static StaticBambuLib & get();
|
||||
static int Fake_Bambu_Create(Bambu_Tunnel*, char const*) { return -2; }
|
||||
|
@ -973,6 +978,8 @@ void PrinterFileSystem::SendChangedEvent(wxEventType type, size_t index, std::st
|
|||
event.SetInt(index);
|
||||
if (!str.empty())
|
||||
event.SetString(wxString::FromUTF8(str.c_str()));
|
||||
else if (auto iter = error_messages.find(extra); iter != error_messages.end())
|
||||
event.SetString(wxString::FromUTF8(iter->second.c_str()));
|
||||
event.SetExtraLong(extra);
|
||||
if (wxThread::IsMain())
|
||||
ProcessEventLocally(event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue