mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
FIX: crash of PrinterFileSystem on program exiting
Change-Id: I68afa6768d4e594e7402c5aa8a3c78e363d17173
This commit is contained in:
parent
bfca09c7b2
commit
61d2d47854
2 changed files with 8 additions and 1 deletions
|
@ -154,6 +154,11 @@ MediaFilePanel::MediaFilePanel(wxWindow * parent)
|
||||||
parent->GetParent()->Bind(wxEVT_SHOW, onShowHide);
|
parent->GetParent()->Bind(wxEVT_SHOW, onShowHide);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MediaFilePanel::~MediaFilePanel()
|
||||||
|
{
|
||||||
|
SetMachineObject(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
||||||
{
|
{
|
||||||
std::string machine = obj ? obj->dev_id : "";
|
std::string machine = obj ? obj->dev_id : "";
|
||||||
|
@ -269,4 +274,4 @@ MediaFileFrame::MediaFileFrame(wxWindow* parent)
|
||||||
|
|
||||||
void MediaFileFrame::on_dpi_changed(const wxRect& suggested_rect) { m_panel->Rescale(); Refresh(); }
|
void MediaFileFrame::on_dpi_changed(const wxRect& suggested_rect) { m_panel->Rescale(); Refresh(); }
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -31,6 +31,8 @@ class MediaFilePanel : public wxPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MediaFilePanel(wxWindow * parent);
|
MediaFilePanel(wxWindow * parent);
|
||||||
|
|
||||||
|
~MediaFilePanel();
|
||||||
|
|
||||||
void SetMachineObject(MachineObject * obj);
|
void SetMachineObject(MachineObject * obj);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue