Revert "Fix Compile Warnings (#5963)"

This reverts commit b83e16dbdd.

Found regressions like auto orientation didn't work anymore after this change, revert it
This commit is contained in:
SoftFever 2024-08-12 00:00:20 +08:00
parent 0286c36f42
commit 7082e945b1
184 changed files with 1091 additions and 461 deletions

View file

@ -291,6 +291,7 @@ void PrintingTaskPanel::create_panel(wxWindow* parent)
});
m_button_pause_resume->Bind(wxEVT_LEAVE_WINDOW, [this](auto &e) {
auto buf = m_button_pause_resume->GetClientData();
if (m_button_pause_resume->GetToolTipText() == _L("Pause")) {
m_button_pause_resume->SetBitmap_("print_control_pause");
}
@ -2527,7 +2528,7 @@ void StatusPanel::update_misc_ctrl(MachineObject *obj)
}
bool light_on = obj->chamber_light != MachineObject::LIGHT_EFFECT::LIGHT_EFFECT_OFF;
BOOST_LOG_TRIVIAL(trace) << "light: " << (light_on ? "on" : "off");
BOOST_LOG_TRIVIAL(trace) << "light: " << light_on ? "on" : "off";
if (m_switch_lamp_timeout > 0)
m_switch_lamp_timeout--;
else {
@ -2591,6 +2592,7 @@ void StatusPanel::update_ams(MachineObject *obj)
}
bool is_support_virtual_tray = obj->ams_support_virtual_tray;
bool is_support_filament_backup = obj->is_support_filament_backup;
AMSModel ams_mode = AMSModel::GENERIC_AMS;
if (obj) {
@ -2661,6 +2663,9 @@ void StatusPanel::update_ams(MachineObject *obj)
std::string curr_ams_id = m_ams_control->GetCurentAms();
std::string curr_can_id = m_ams_control->GetCurrentCan(curr_ams_id);
bool is_vt_tray = false;
if (obj->m_tray_tar == std::to_string(VIRTUAL_TRAY_ID))
is_vt_tray = true;
// set segment 1, 2
if (obj->m_tray_now == std::to_string(VIRTUAL_TRAY_ID) ) {
@ -4902,6 +4907,7 @@ wxBoxSizer *ScoreDialog::get_button_sizer()
if (m_upload_status_code == StatusCode::UPLOAD_PROGRESS) {
int need_upload_nums = need_upload_images.size();
int upload_nums = 0;
int upload_failed_nums = 0;
ProgressDialog *progress_dialog = new ProgressDialog(_L("Upload Pictrues"), _L("Number of images successfully uploaded") + ": " + std::to_string(upload_nums) + "/" + std::to_string(need_upload_nums), need_upload_nums, this);
for (std::set<std::pair<wxStaticBitmap *, wxString>>::iterator it = need_upload_images.begin(); it != need_upload_images.end();) {
std::pair<wxStaticBitmap *, wxString> need_upload = *it;