mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-28 18:30:33 -07:00
ENH: disable calibration button in 2d mode
Jira: [STUDIO-12455] Change-Id: Ibf8a0478f19ddd8997b1719e6c6e78fed49da016 (cherry picked from commit d48f90103553598e1519ddbac648454aeae1cbe1)
This commit is contained in:
parent
27a23a8baf
commit
e774104f87
1 changed files with 12 additions and 0 deletions
|
|
@ -1526,6 +1526,7 @@ wxBoxSizer *StatusBasePanel::create_machine_control_page(wxWindow *parent)
|
|||
m_calibration_btn->SetTextColor(wxColour("#FFFFFE"));
|
||||
m_calibration_btn->SetSize(wxSize(FromDIP(128), 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(0, 0, 1, wxEXPAND, 0);
|
||||
|
|
@ -3536,6 +3537,17 @@ void StatusPanel::update_cali(MachineObject *obj)
|
|||
{
|
||||
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()) {
|
||||
m_calibration_btn->SetLabel(_L("Calibrating"));
|
||||
if (calibration_dlg && calibration_dlg->IsShown()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue