FIX: enhance filament_map auto manual behavior

1. auto mode dragdrop is not allowed
2. not display filament_map when there is no result in auto mode

jira:none

Change-Id: I0800e0d832e27fe459a17bb1aa829b5e72d0ee8f
(cherry picked from commit 9ee85bef34aaabe7a4cef251f07e77f9af693a2f)
This commit is contained in:
zhimin.zeng
2024-08-09 17:46:11 +08:00
committed by Noisyfox
parent 14a0de5d2f
commit 58226a65e0
10 changed files with 147 additions and 28 deletions

View File

@@ -14450,11 +14450,17 @@ void Plater::open_platesettings_dialog(wxCommandEvent& evt) {
void Plater::open_filament_map_setting_dialog(wxCommandEvent &evt)
{
PartPlate* curr_plate = p->partplate_list.get_curr_plate();
FilamentMapDialog filament_dlg(this, config(), curr_plate->get_filament_maps(), curr_plate->get_extruders(true), curr_plate->get_filament_map_mode() == FilamentMapMode::fmmAuto);
FilamentMapDialog filament_dlg(this, config(), curr_plate->get_filament_maps(), curr_plate->get_extruders(true),
curr_plate->get_filament_map_mode() == FilamentMapMode::fmmAuto, curr_plate->has_auto_filament_map_reslut());
if (filament_dlg.ShowModal() == wxID_OK) {
std::vector<int> new_filament_maps = filament_dlg.get_filament_maps();
std::vector<int> old_filament_maps = curr_plate->get_filament_maps();
FilamentMapMode new_map_mode = filament_dlg.is_auto() ? FilamentMapMode::fmmAuto : FilamentMapMode::fmmManual;
if (new_map_mode == FilamentMapMode::fmmManual) {
curr_plate->set_auto_filament_map_result(false);
}
FilamentMapMode old_map_mode = curr_plate->get_filament_map_mode();
bool need_invalidate = false;
if (new_map_mode != old_map_mode) {