fix(imex): repaint plate-selector icon when a plate's slice-ready state flips

The big upstream merge replaced the old per-idle unconditional plate-selector toolbar
refresh with a dirty flag (Plater::mark_plate_toolbar_image_dirty), which the
geometry-change sites already set. PartPlate::update_slice_result_valid_state flips a
plate's slice-ready / IMEX blocked-plate ("naughty plate") state without any geometry
change and did not set the flag, so after the merge nothing repaints that plate's
thumbnail or warning badge — the old per-idle refresh used to mask it. Mark the toolbar
image dirty when the state actually changes, matching the established pattern.

Cosmetic; no effect on slicing. Surfaced by the merge review of 58b4a68a10.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clifford Garwood
2026-07-19 19:10:08 -04:00
co-authored by Claude Opus 4.8
parent 58b4a68a10
commit f74b8177af
+7
View File
@@ -4608,12 +4608,19 @@ void PartPlate::update_states()
void PartPlate::update_slice_result_valid_state(bool valid)
{
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": plate %1% , update slice result from %2% to %3%") % m_plate_index %m_slice_result_valid %valid;
const bool changed = (m_slice_result_valid != valid);
m_slice_result_valid = valid;
if (valid)
m_slice_percent = 100.0f;
else {
m_slice_percent = -1.0f;
}
// This flips the plate's slice-ready / IMEX blocked-plate state without a geometry change,
// so the plate-selector thumbnail/warning badge must be repainted explicitly. Upstream
// replaced the old per-idle unconditional toolbar refresh with this dirty flag, so nothing
// else repaints the naughty-plate icon otherwise.
if (changed && m_plater)
m_plater->mark_plate_toolbar_image_dirty();
}
// IMEX firmware-managed zones: compute the plate-local primary-zone center and push it