FIX: add some missing translate keys

1. Add missing translation keys
2. Fix filament map dialog can't display in auto mode

JIRA:STUDIO-10216

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I0c3927877dd91befc2463a300324bc6823615673
(cherry picked from commit 3733f33953fa89b490be0d2f36e225fa62dcbc00)
This commit is contained in:
xun.zhang
2025-02-14 17:19:30 +08:00
committed by Noisyfox
parent 296a8bc474
commit acbea85829
7 changed files with 27 additions and 24 deletions

View File

@@ -53,8 +53,8 @@ FilamentGroupPopup::FilamentGroupPopup(wxWindow *parent) : PopupWindow(parent, w
const wxString AutoForMatchLabel = _L("Convenience Mode");
const wxString ManualLabel = _L("Custom Mode");
const wxString AutoForFlushDetail = _L("Recommends filament grouping for the left and right nozzles based on the most filament-saving principles to minimize waste");
const wxString AutoForMatchDetail = _L("Recommends filament grouping for the left and right nozzles based on the printer's actual filament status, reducing the need for manual filament adjustment");
const wxString AutoForFlushDetail = _L("Generates filament grouping for the left and right nozzles based on the most filament-saving principles to minimize waste");
const wxString AutoForMatchDetail = _L("Generates filament grouping for the left and right nozzles based on the printer's actual filament status, reducing the need for manual filament adjustment");
const wxString ManualDetail = _L("Manually assign filament to the left or right nozzle");
const wxString AutoForFlushDesp = ""; //_L("(Post-slicing arrangement)");

View File

@@ -38,14 +38,13 @@ extern std::string& get_left_extruder_unprintable_text();
extern std::string& get_right_extruder_unprintable_text();
bool try_pop_up_before_slice(bool is_slice_all, Plater* plater_ref, PartPlate* partplate_ref)
bool try_pop_up_before_slice(bool is_slice_all, Plater* plater_ref, PartPlate* partplate_ref, bool force_pop_up)
{
auto full_config = wxGetApp().preset_bundle->full_config();
const auto nozzle_diameters = full_config.option<ConfigOptionFloatsNullable>("nozzle_diameter");
if (nozzle_diameters->size() <= 1)
return true;
bool force_pop_up = get_pop_up_remind_flag();
bool sync_plate = true;
std::vector<std::string> filament_colors = full_config.option<ConfigOptionStrings>("filament_colour")->values;
@@ -53,7 +52,7 @@ bool try_pop_up_before_slice(bool is_slice_all, Plater* plater_ref, PartPlate* p
std::vector<int> applied_maps = get_applied_map(full_config, plater_ref, partplate_ref, sync_plate);
applied_maps.resize(filament_colors.size(), 1);
if (applied_mode != fmmManual)
if (!force_pop_up && applied_mode != fmmManual)
return true;
std::vector<int> filament_lists;

View File

@@ -27,7 +27,7 @@ class PartPlate;
* @param partplate_ref Partplate to get/set plate filament map mode
* @return whether continue slicing
*/
bool try_pop_up_before_slice(bool is_slice_all, Plater* plater_ref, PartPlate* partplate_ref);
bool try_pop_up_before_slice(bool is_slice_all, Plater* plater_ref, PartPlate* partplate_ref, bool force_pop_up = false);
class FilamentMapDialog : public wxDialog

View File

@@ -282,9 +282,9 @@ void GUI::FilamentMapBtnPanel::Show()
FilamentMapAutoPanel::FilamentMapAutoPanel(wxWindow *parent, FilamentMapMode mode, bool machine_synced) : wxPanel(parent)
{
const wxString AutoForFlushDetail = _L("Recommends filament grouping for the left and right nozzles based on the most filament-saving principles to minimize waste");
const wxString AutoForFlushDetail = _L("Generates filament grouping for the left and right nozzles based on the most filament-saving principles to minimize waste");
const wxString AutoForMatchDetail = _L("Recommends filament grouping for the left and right nozzles based on the printer's actual filament status, reducing the need for manual filament adjustment");
const wxString AutoForMatchDetail = _L("Generates filament grouping for the left and right nozzles based on the printer's actual filament status, reducing the need for manual filament adjustment");
auto sizer = new wxBoxSizer(wxHORIZONTAL);
m_flush_panel = new FilamentMapBtnPanel(this, _L("Filament-Saving Mode"), AutoForFlushDetail, "flush_mode_panel_icon");

View File

@@ -3098,7 +3098,7 @@ void NotificationManager::bbl_show_filament_map_invalid_notification_before_slic
auto callback = [](wxEvtHandler*) {
auto plater = wxGetApp().plater();
auto partplate = plater->get_partplate_list().get_curr_plate();
try_pop_up_before_slice(false, plater, partplate); // ignore the return value
try_pop_up_before_slice(false, plater, partplate, true); // ignore the return value
return false;
};