mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-10 10:47:16 +00:00
Plugin-gate the reslice check and drop non-plugin leftovers
reslice() now enforces only the missing-plugin block via refresh_missing_plugin_block (no second Print::validate); plate ready-status returns to upstream's plain model_fits, matching GLCanvas3D::reload_scene. Also restores main's use_bbl_device_tab and the check_track_enable comment, and drops two unused MainFrame includes.
This commit is contained in:
@@ -5404,7 +5404,7 @@ void GUI_App::on_user_login_handle(wxCommandEvent &evt)
|
||||
|
||||
void GUI_App::check_track_enable()
|
||||
{
|
||||
// Orca: alaways disable track event
|
||||
// Orca: telemetry only exists on the BBL cloud agent; always disable it.
|
||||
if (m_agent) {
|
||||
m_agent->track_enable(false);
|
||||
m_agent->track_remove_files();
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
#include "MainFrame.hpp"
|
||||
|
||||
#include <wx/event.h>
|
||||
#ifdef __WXGTK__
|
||||
#include <wx/gtk/app.h>
|
||||
#endif
|
||||
#include <wx/panel.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/listbook.h>
|
||||
|
||||
@@ -16761,14 +16761,15 @@ void Plater::reslice()
|
||||
if (get_view3D_canvas3D()->get_gizmos_manager().is_in_editing_mode(true))
|
||||
return;
|
||||
|
||||
// Keep slicing blocked even if a toolbar/menu path has not refreshed its enabled state yet.
|
||||
// validate_current_plate also refreshes the missing-plugin notifications and plate readiness.
|
||||
bool model_fits = false;
|
||||
bool validate_error = false;
|
||||
validate_current_plate(model_fits, validate_error);
|
||||
if (!model_fits || validate_error) {
|
||||
// Enforce the missing-plugin block at the slicing choke point: menu/keyboard/queued triggers can
|
||||
// carry a stale enabled state while plugins load asynchronously. refresh_missing_plugin_block
|
||||
// rebuilds the missing sets and notifications from the active presets without running
|
||||
// Print::validate; all other validation keeps upstream behavior and is surfaced by
|
||||
// update_background_process() below.
|
||||
if (refresh_missing_plugin_block()) {
|
||||
p->partplate_list.get_curr_plate()->update_slice_ready_status(false);
|
||||
p->main_frame->update_slice_print_status(MainFrame::eEventPlateUpdate, false);
|
||||
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << ": current plate validation failed; slicing blocked.";
|
||||
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << ": required plugins missing; slicing blocked.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -18713,7 +18714,7 @@ void Plater::validate_current_plate(bool& model_fits, bool& validate_error)
|
||||
}
|
||||
|
||||
PartPlate* part_plate = p->partplate_list.get_curr_plate();
|
||||
part_plate->update_slice_ready_status(model_fits && !validate_error);
|
||||
part_plate->update_slice_ready_status(model_fits);
|
||||
|
||||
// The toolbar Slice button is normally refreshed only by the canvas
|
||||
// (EVT_GLCANVAS_ENABLE_ACTION_BUTTONS) on geometry updates. When the missing-plugin block toggles
|
||||
@@ -18722,7 +18723,7 @@ void Plater::validate_current_plate(bool& model_fits, bool& validate_error)
|
||||
// can_slice() flag that get_enable_slice_status() reads — so the button doesn't lag until the
|
||||
// next bed click.
|
||||
if (plugins_block_changed && !p->background_process.running())
|
||||
p->main_frame->update_slice_print_status(MainFrame::eEventObjectUpdate, model_fits && !validate_error);
|
||||
p->main_frame->update_slice_print_status(MainFrame::eEventObjectUpdate, model_fits);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -722,7 +722,7 @@ public:
|
||||
// Rebuild the missing-plugin sets from the active presets and (re)show/close their notifications.
|
||||
// Returns true when slicing must be blocked (a referenced plugin is still missing); sets
|
||||
// *block_toggled when the blocked state changed since the previous call (so the caller can refresh
|
||||
// the Slice button). Helper for validate_current_plate.
|
||||
// the Slice button). Helper for validate_current_plate and the reslice() gate.
|
||||
bool refresh_missing_plugin_block(bool* block_toggled = nullptr);
|
||||
// Re-run plate validation when a plugin finishes loading, but only while a missing-plugin
|
||||
// notification is active, so it clears automatically once the required plugin is available.
|
||||
|
||||
Reference in New Issue
Block a user