Skip to content

Commit

Permalink
Don't reset gcode preview when open as gcode viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
Noisyfox committed Mar 8, 2025
1 parent af8bdb1 commit 588022e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/slic3r/GUI/BackgroundSlicingProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,15 @@ Print::ApplyStatus BackgroundSlicingProcess::apply(const Model &model, const Dyn
DynamicPrintConfig new_config = config;
new_config.apply(*m_current_plate->config());
Print::ApplyStatus invalidated = m_print->apply(model, new_config);

// Orca: prevent resetting under gcode viewer mode
if (invalidated != PrintBase::APPLY_STATUS_UNCHANGED) {
const auto plater = GUI::wxGetApp().mainframe->m_plater;
if (plater && plater->only_gcode_mode()) {
invalidated = PrintBase::APPLY_STATUS_UNCHANGED;
}
}

if ((invalidated & PrintBase::APPLY_STATUS_INVALIDATED) != 0 && m_print->technology() == ptFFF &&
!m_fff_print->is_step_done(psGCodeExport)) {
// Some FFF status was invalidated, and the G-code was not exported yet.
Expand Down

0 comments on commit 588022e

Please sign in to comment.