mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
ENH: some tip logic optimize
1. Only check printablily if have explicit filament map 2. Refine some sentences jira:STUDIO-9753,STUDIO-9727 Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I2fc3aa2276dc6f514c50ac2fcaf9509f41e778f3 (cherry picked from commit 73f92d27dab667c8893ab96e47f3832ce9d2de60)
This commit is contained in:
@@ -1730,6 +1730,13 @@ std::vector<int> PartPlate::get_used_filaments()
|
||||
bool PartPlate::check_filament_printable(const DynamicPrintConfig &config, wxString& error_message)
|
||||
{
|
||||
error_message.clear();
|
||||
FilamentMapMode mode = config.option<ConfigOptionEnum<FilamentMapMode>>("filament_map_mode")->value;
|
||||
bool has_valid_result = this->is_slice_result_valid();
|
||||
|
||||
// only check printablity if we have explicit map result
|
||||
if (!has_valid_result && mode != fmmManual)
|
||||
return true;
|
||||
|
||||
std::vector<int> used_filaments = get_extruders(true); // 1 base
|
||||
if (!used_filaments.empty()) {
|
||||
for (auto filament_idx : used_filaments) {
|
||||
@@ -1742,7 +1749,7 @@ bool PartPlate::check_filament_printable(const DynamicPrintConfig &config, wxStr
|
||||
auto iter = std::find(filament_types.begin(), filament_types.end(), filament_type);
|
||||
if (iter != filament_types.end()) {
|
||||
wxString extruder_name = extruder_idx == 0 ? _L("left") : _L("right");
|
||||
error_message = wxString::Format(_L("Filament %s cannot be placed in the %s extruder for printing."), filament_type, extruder_name);
|
||||
error_message = wxString::Format(_L("The %s nozzle can not print %s."), extruder_name, filament_type);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user