mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
ENH: disable calibration button in 2d mode
Jira: [STUDIO-12455] Change-Id: Ibf8a0478f19ddd8997b1719e6c6e78fed49da016 (cherry picked from commit d48f90103553598e1519ddbac648454aeae1cbe1)
This commit is contained in:
@@ -1526,6 +1526,7 @@ wxBoxSizer *StatusBasePanel::create_machine_control_page(wxWindow *parent)
|
|||||||
m_calibration_btn->SetTextColor(wxColour("#FFFFFE"));
|
m_calibration_btn->SetTextColor(wxColour("#FFFFFE"));
|
||||||
m_calibration_btn->SetSize(wxSize(FromDIP(128), FromDIP(26)));
|
m_calibration_btn->SetSize(wxSize(FromDIP(128), FromDIP(26)));
|
||||||
m_calibration_btn->SetMinSize(wxSize(-1, FromDIP(26)));
|
m_calibration_btn->SetMinSize(wxSize(-1, FromDIP(26)));
|
||||||
|
m_calibration_btn->EnableTooltipEvenDisabled();
|
||||||
|
|
||||||
bSizer_control_title->Add(m_staticText_control, 1, wxALIGN_CENTER_VERTICAL | wxLEFT, PAGE_TITLE_LEFT_MARGIN);
|
bSizer_control_title->Add(m_staticText_control, 1, wxALIGN_CENTER_VERTICAL | wxLEFT, PAGE_TITLE_LEFT_MARGIN);
|
||||||
bSizer_control_title->Add(0, 0, 1, wxEXPAND, 0);
|
bSizer_control_title->Add(0, 0, 1, wxEXPAND, 0);
|
||||||
@@ -3536,6 +3537,17 @@ void StatusPanel::update_cali(MachineObject *obj)
|
|||||||
{
|
{
|
||||||
if (!obj) return;
|
if (!obj) return;
|
||||||
|
|
||||||
|
// disable calibration button in 2D
|
||||||
|
if (!obj->is_fdm_type()) {
|
||||||
|
m_calibration_btn->SetToolTip(_L("Printer 2D mode does not support 3D calibration"));
|
||||||
|
m_calibration_btn->SetLabel(_L("Calibration"));
|
||||||
|
m_calibration_btn->Disable();
|
||||||
|
return;
|
||||||
|
} else if (!m_calibration_btn->IsEnabled()) {
|
||||||
|
m_calibration_btn->SetToolTip(wxEmptyString);
|
||||||
|
m_calibration_btn->Enable();
|
||||||
|
}
|
||||||
|
|
||||||
if (obj->is_calibration_running()) {
|
if (obj->is_calibration_running()) {
|
||||||
m_calibration_btn->SetLabel(_L("Calibrating"));
|
m_calibration_btn->SetLabel(_L("Calibrating"));
|
||||||
if (calibration_dlg && calibration_dlg->IsShown()) {
|
if (calibration_dlg && calibration_dlg->IsShown()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user