mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-31 00:52:51 +00:00
Deregister the update callback on end of the application.
This fixes a crash on exit.
This commit is contained in:
@@ -920,11 +920,6 @@ ConfigOptionsGroup* get_optgroup()
|
||||
return m_optgroup.get();
|
||||
}
|
||||
|
||||
void register_on_request_update_callback(void* callback) {
|
||||
if (callback != nullptr)
|
||||
g_on_request_update_callback.register_callback(callback);
|
||||
}
|
||||
|
||||
wxButton* get_wiping_dialog_button()
|
||||
{
|
||||
return g_wiping_dialog_button;
|
||||
|
||||
@@ -172,8 +172,8 @@ wxString from_u8(const std::string &str);
|
||||
|
||||
void add_frequently_changed_parameters(wxWindow* parent, wxBoxSizer* sizer, wxFlexGridSizer* preset_sizer);
|
||||
|
||||
// Callback to trigger a configuration update timer on the Plater.
|
||||
static PerlCallback g_on_request_update_callback;
|
||||
void register_on_request_update_callback(void* callback);
|
||||
|
||||
ConfigOptionsGroup* get_optgroup();
|
||||
wxButton* get_wiping_dialog_button();
|
||||
|
||||
@@ -105,11 +105,9 @@ void fix_model_by_win10_sdk_gui(ModelObject *model_object_src, Print *print, Mod
|
||||
void set_3DScene(SV *scene)
|
||||
%code%{ Slic3r::GUI::set_3DScene((_3DScene *)wxPli_sv_2_object(aTHX_ scene, "Slic3r::Model::3DScene") ); %};
|
||||
|
||||
%package{Slic3r::_GUI};
|
||||
%{
|
||||
void
|
||||
register_on_request_update_callback(callback)
|
||||
SV *callback;
|
||||
CODE:
|
||||
Slic3r::GUI::register_on_request_update_callback((void*)callback);
|
||||
%}
|
||||
void register_on_request_update_callback(SV* callback)
|
||||
%code%{ Slic3r::GUI::g_on_request_update_callback.register_callback(callback); %};
|
||||
|
||||
void deregister_on_request_update_callback()
|
||||
%code%{ Slic3r::GUI::g_on_request_update_callback.deregister_callback(); %};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user