Regroup the slicer's MCP commands and let each run from its arguments

Outside the Design tab an agent had 175 commands, 50 of them in the tool
list. There are now 118, named by what they act on (`object_`, `plate_`,
`preset_`, `filament_`, `plugin_` and so on), and 115 are listed. Each takes
its target and values in the call, acts on the selection when it names no
target and says what it acted on; an old name is refused. Printers and
system filaments install and uninstall, preferences read and write, plugins
enable, reload, uninstall and refresh, and objects reorder, with no dialog
to drive.

The Speed Dial keeps its 129 tiles under the same ids. Eight defects in the
rows these commands share with the menus are fixed. For a person: an object
row that cannot run says why instead of "Select an object first.", rows
that failed no longer claim success, Duplicate Plate can be undone, and
Refresh Plugins picked while a refresh runs now runs after it instead of
beside it.
This commit is contained in:
SoftFever committed 2026-11-18 16:50:32 +08:00
1 parent 74c98e197c
commit d64e10f4dd
287 files changed
+40484 -16770

No files matched your search

+13 -10
View File
@@ -5916,6 +5916,17 @@ void TabPrinter::extruders_count_changed(size_t extruders_count)
}
}
void TabPrinter::change_extruders_count(size_t extruders_count)
{
const size_t old_extruders_count = m_extruders_count;
extruders_count_changed(extruders_count);
init_options_list(); // m_options_list should be updated before UI updating
update_dirty();
// Orca: the variant switches (here, Process in the sidebar, ...) list one option per extruder.
if (m_extruders_count != old_extruders_count)
update_all_extruder_variants();
}
void TabPrinter::append_option_line(ConfigOptionsGroupShp optgroup, const std::string opt_key, const std::string& label_path)
{
auto option = optgroup->get_option(opt_key, 0);
@@ -6075,13 +6086,7 @@ if (is_marlin_flavor)
size_t extruders_count = size_t(boost::any_cast<int>(v));
wxTheApp->CallAfter([this, opt_key, value, extruders_count]() {
if (opt_key == "extruders_count" || opt_key == "single_extruder_multi_material") {
const size_t old_extruders_count = m_extruders_count;
extruders_count_changed(extruders_count);
init_options_list(); // m_options_list should be updated before UI updating
update_dirty();
// Orca: the variant switches (here, Process in the sidebar, ...) list one option per extruder.
if (m_extruders_count != old_extruders_count)
update_all_extruder_variants();
change_extruders_count(extruders_count);
if (opt_key == "single_extruder_multi_material") { // the single_extruder_multimaterial was added to force pages
on_value_change(opt_key, value); // rebuild - let's make sure the on_value_change is not skipped
@@ -7833,9 +7838,7 @@ bool Tab::can_transfer_changes_to(const std::string& preset_name) const
return first_type(m_presets->get_edited_preset()) == first_type(*to_be_selected);
}
// The unsaved changes UnsavedChangesDialog lists for a preset switch, all of which its Transfer moves:
// the changed options (key#index for one entry of a vector) that a settings page shows in the current mode.
static std::vector<std::string> listed_dirty_options(const PresetCollection& presets)
std::vector<std::string> listed_dirty_options(const PresetCollection& presets)
{
Search::SettingsIndex& index = wxGetApp().sidebar().settings_index();
index.sort_options_by_key();