mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-24 03:12:07 +00:00
FIX: enable edit and delete preset btn and fix issue
Jira: XXXX Change-Id: I724d7236b28fcc4746698f094531948a8fbb5d93 Signed-off-by: maosheng.wei <maosheng.wei@bambulab.com>
This commit is contained in:
@@ -178,10 +178,8 @@ wxDEFINE_EVENT(EVT_GLCANVAS_COLOR_MODE_CHANGED, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_PRINT_FROM_SDCARD_VIEW, SimpleEvent);
|
||||
|
||||
wxDEFINE_EVENT(EVT_CREATE_FILAMENT, SimpleEvent);
|
||||
|
||||
wxDEFINE_EVENT(EVT_MODIFY_FILAMENT, SimpleEvent);
|
||||
|
||||
|
||||
bool Plater::has_illegal_filename_characters(const wxString& wxs_name)
|
||||
{
|
||||
std::string name = into_u8(wxs_name);
|
||||
@@ -1183,7 +1181,11 @@ void Sidebar::update_presets(Preset::Type preset_type)
|
||||
preset_bundle.set_filament_preset(p->editing_filament, name);
|
||||
} else if (filament_cnt == 1) {
|
||||
// Single filament printer, synchronize the filament presets.
|
||||
preset_bundle.set_filament_preset(0, name);
|
||||
Preset *preset = preset_bundle.filaments.find_preset(name, false);
|
||||
if (preset) {
|
||||
if (preset->is_compatible) preset_bundle.set_filament_preset(0, name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < filament_cnt; i++)
|
||||
@@ -1848,7 +1850,6 @@ void Sidebar::auto_calc_flushing_volumes(const int modify_id) {
|
||||
wxPostEvent(this, SimpleEvent(EVT_SCHEDULE_BACKGROUND_PROCESS, this));
|
||||
}
|
||||
|
||||
|
||||
// Plater::DropTarget
|
||||
|
||||
class PlaterDropTarget : public wxFileDropTarget
|
||||
@@ -7540,7 +7541,6 @@ void Plater::priv::on_modify_filament(SimpleEvent &evt)
|
||||
FilamentInfomation * filament_info = static_cast<FilamentInfomation *>(evt.GetEventObject());
|
||||
EditFilamentPresetDialog dlg(wxGetApp().mainframe, filament_info);
|
||||
int res = dlg.ShowModal();
|
||||
|
||||
wxGetApp().mainframe->update_side_preset_ui();
|
||||
update_ui_from_settings();
|
||||
sidebar->update_all_preset_comboboxes();
|
||||
|
||||
Reference in New Issue
Block a user