From eacc236ccb8fbe1d882e586a885fa77d9419ace8 Mon Sep 17 00:00:00 2001 From: ExPikaPaka Date: Tue, 21 Jul 2026 12:53:00 +0200 Subject: [PATCH] Fix typo again --- src/slic3r/GUI/ImGuiWrapper.cpp | 4 ++-- src/slic3r/GUI/Plater.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index cd8f0aa2e5..2519595be9 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -1902,7 +1902,7 @@ void ImGuiWrapper::search_list(const ImVec2& size_, bool (*items_getter)(int, co scroll_up(); else { if (hovered_id > 0) - -hovered_id; + --hovered_id; scroll_y(hovered_id); } }); @@ -2293,7 +2293,7 @@ std::string ImGuiWrapper::trunc(const std::string &text, } else { // decrease letter count while (count_letter > 1) { - -count_letter; + --count_letter; result_text = text_.substr(0, count_letter); text_width = calc_text_size(result_text).x; if (text_width < allowed_width) break; diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 7efa17b470..cc6e6fedd6 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -866,7 +866,7 @@ void Sidebar::priv::flush_printer_sync(bool restart) } //btn_sync_printer->SetBackgroundColorNormal((*counter_sync_printer & 1) ? "#F8F8F8" :"#009688"); m_printer_bbl_sync->SetBitmap_((*counter_sync_printer & 1) ? "printer_sync_not" : "printer_sync_ok"); - if (-*counter_sync_printer <= 0) + if (--*counter_sync_printer <= 0) timer_sync_printer->Stop(); } @@ -1307,7 +1307,7 @@ ExtruderGroup::ExtruderGroup(wxWindow * parent, int index, wxString const &title btn_up->SetBackgroundColour(*wxWHITE); btn_up->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this, index](auto &evt) { if (page_cur > 0) - -page_cur; + --page_cur; update_ams(); }); btn_up->Hide(); @@ -1376,7 +1376,7 @@ void ExtruderGroup::update_ams() ams[index]->Refresh(); ams[index]->Open(); } - for (size_t i = i1; i < ams_n1 && left > 0; ++i, ++index, -left) { + for (size_t i = i1; i < ams_n1 && left > 0; ++i, ++index, --left) { ams[index]->Update(i < ams_1.size() ? ams_1[i] : info1); ams[index]->Refresh(); ams[index]->Open(); @@ -4519,7 +4519,7 @@ void Sidebar::sync_ams_list(bool is_from_big_sync_btn) for (size_t i = 0; i < merge_info.merges.size(); i++) { auto& cur = merge_info.merges[i]; - for (int j = cur.size() -1; j >= 1 ; j-) { + for (int j = cur.size() -1; j >= 1 ; j--) { auto last_index = cur[j]; change_filament(last_index, cur[0]); cur.erase(cur.begin() + j); @@ -12615,7 +12615,7 @@ void Plater::priv::undo() const std::vector &snapshots = this->undo_redo_stack().snapshots(); auto it_current = std::lower_bound(snapshots.begin(), snapshots.end(), UndoRedo::Snapshot(this->undo_redo_stack().active_snapshot_time())); // BBS: undo-redo until modify record - while (-it_current != snapshots.begin() && !snapshot_modifies_project(*it_current)); + while (--it_current != snapshots.begin() && !snapshot_modifies_project(*it_current)); if (it_current == snapshots.begin()) return; if (get_current_canvas3D()->get_canvas_type() == GLCanvas3D::CanvasAssembleView) { if (it_current->snapshot_data.snapshot_type != UndoRedo::SnapshotType::GizmoAction && @@ -12635,7 +12635,7 @@ void Plater::priv::redo() while (it_current != snapshots.end() && !snapshot_modifies_project(*it_current++)); if (it_current != snapshots.end()) { while (it_current != snapshots.end() && !snapshot_modifies_project(*it_current++)); - this->undo_redo_to(-it_current); + this->undo_redo_to(--it_current); } }