Fixed export/import from/to amf and 3mf file.

This commit is contained in:
YuSanka 2020-06-08 12:25:29 +02:00
parent 629584e28f
commit 43cfd44864
5 changed files with 80 additions and 43 deletions

View file

@ -1506,8 +1506,9 @@ void Control::show_add_context_menu()
append_menu_item(&menu, wxID_ANY, _L("Add pause print") + " (" + gcode(PausePrint) + ")", "",
[this](wxCommandEvent&) { add_code_as_tick(PausePrint); }, "pause_print", &menu);
append_menu_item(&menu, wxID_ANY, _L("Add custom template") + " (" + gcode(Template) + ")", "",
[this](wxCommandEvent&) { add_code_as_tick(Template); }, "edit_gcode", &menu);
if (!gcode(Template).empty())
append_menu_item(&menu, wxID_ANY, _L("Add custom template") + " (" + gcode(Template) + ")", "",
[this](wxCommandEvent&) { add_code_as_tick(Template); }, "edit_gcode", &menu);
append_menu_item(&menu, wxID_ANY, _L("Add custom G-code"), "",
[this](wxCommandEvent&) { add_code_as_tick(Custom); }, "edit_gcode", &menu);
@ -1898,7 +1899,7 @@ void Control::jump_to_print_z()
void Control::post_ticks_changed_event(Type type /*= Custom*/)
{
m_force_mode_apply = (type == Custom || type == ColorChange || type == ToolChange);
m_force_mode_apply = type != ToolChange;
wxPostEvent(this->GetParent(), wxCommandEvent(wxCUSTOMEVT_TICKSCHANGED));
}

View file

@ -34,20 +34,6 @@ namespace Search {
#define SEARCH_SUPPORTS_MARKUP
#endif
static const std::vector<std::wstring>& NameByType()
{
static std::vector<std::wstring> data;
if (data.empty()) {
data.assign(Preset::TYPE_COUNT, std::wstring());
data[Preset::TYPE_PRINT ] = _L("Print" ).ToStdWstring();
data[Preset::TYPE_FILAMENT ] = _L("Filament" ).ToStdWstring();
data[Preset::TYPE_SLA_MATERIAL ] = _L("Material" ).ToStdWstring();
data[Preset::TYPE_SLA_PRINT ] = _L("Print" ).ToStdWstring();
data[Preset::TYPE_PRINTER ] = _L("Printer" ).ToStdWstring();
};
return data;
}
static char marker_by_type(Preset::Type type, PrinterTechnology pt)
{
switch(type) {