mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
FIX: [STUDIO-2448] switch machine in camera popup
Change-Id: I40531dde899beb11efea985348de8b77354e6724
This commit is contained in:
parent
c770926142
commit
164251531e
3 changed files with 10 additions and 12 deletions
|
@ -28,9 +28,8 @@ wxDEFINE_EVENT(EVT_SDCARD_ABSENT_HINT, wxCommandEvent);
|
|||
|
||||
const wxColour TEXT_COL = wxColour(43, 52, 54);
|
||||
|
||||
CameraPopup::CameraPopup(wxWindow *parent, MachineObject* obj)
|
||||
: PopupWindow(parent, wxBORDER_NONE | wxPU_CONTAINS_CONTROLS),
|
||||
m_obj(obj)
|
||||
CameraPopup::CameraPopup(wxWindow *parent)
|
||||
: PopupWindow(parent, wxBORDER_NONE | wxPU_CONTAINS_CONTROLS)
|
||||
{
|
||||
#ifdef __WINDOWS__
|
||||
SetDoubleBuffered(true);
|
||||
|
@ -52,8 +51,6 @@ CameraPopup::CameraPopup(wxWindow *parent, MachineObject* obj)
|
|||
m_text_recording->SetFont(Label::Head_14);
|
||||
m_text_recording->SetForegroundColour(TEXT_COL);
|
||||
m_switch_recording = new SwitchButton(m_panel);
|
||||
if (obj)
|
||||
m_switch_recording->SetValue(obj->camera_recording_when_printing);
|
||||
|
||||
//vcamera
|
||||
m_text_vcamera = new wxStaticText(m_panel, wxID_ANY, _L("Go Live"));
|
||||
|
@ -80,8 +77,6 @@ CameraPopup::CameraPopup(wxWindow *parent, MachineObject* obj)
|
|||
top_sizer->Add(m_resolution_options[i], 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, FromDIP(5));
|
||||
top_sizer->Add(0, 0, wxALL, 0);
|
||||
}
|
||||
if (obj)
|
||||
sync_resolution_setting(obj->camera_resolution);
|
||||
|
||||
main_sizer->Add(top_sizer, 0, wxALL, FromDIP(10));
|
||||
|
||||
|
@ -127,7 +122,6 @@ CameraPopup::CameraPopup(wxWindow *parent, MachineObject* obj)
|
|||
m_interval_timer = new wxTimer();
|
||||
m_interval_timer->SetOwner(this);
|
||||
|
||||
check_func_supported();
|
||||
wxGetApp().UpdateDarkUIWin(this);
|
||||
}
|
||||
|
||||
|
@ -260,8 +254,11 @@ void CameraPopup::sync_vcamera_state(bool show_vcamera)
|
|||
rescale();
|
||||
}
|
||||
|
||||
void CameraPopup::check_func_supported()
|
||||
void CameraPopup::check_func_supported(MachineObject *obj2)
|
||||
{
|
||||
m_obj = obj2;
|
||||
if (m_obj == nullptr)
|
||||
return;
|
||||
// function supported
|
||||
if (m_obj->is_function_supported(PrinterFunction::FUNC_RECORDING) && m_obj->has_ipcam) {
|
||||
m_text_recording->Show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue