Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer
This commit is contained in:
commit
6bc6806a2e
@ -1310,7 +1310,7 @@ std::string Print::validate() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate first_layer_height
|
// validate first_layer_height
|
||||||
double first_layer_height = object->config().get_abs_value(L("first_layer_height"));
|
double first_layer_height = object->config().get_abs_value("first_layer_height");
|
||||||
double first_layer_min_nozzle_diameter;
|
double first_layer_min_nozzle_diameter;
|
||||||
if (object->config().raft_layers > 0) {
|
if (object->config().raft_layers > 0) {
|
||||||
// if we have raft layers, only support material extruder is used on first layer
|
// if we have raft layers, only support material extruder is used on first layer
|
||||||
|
@ -58,13 +58,14 @@ namespace GUI {
|
|||||||
wxString file_wildcards(FileType file_type, const std::string &custom_extension)
|
wxString file_wildcards(FileType file_type, const std::string &custom_extension)
|
||||||
{
|
{
|
||||||
static const std::string defaults[FT_SIZE] = {
|
static const std::string defaults[FT_SIZE] = {
|
||||||
/* FT_STL */ "STL files (*.stl)|*.stl;*.STL",
|
/* FT_STL */ "STL files (*.stl)|*.stl;*.STL",
|
||||||
/* FT_OBJ */ "OBJ files (*.obj)|*.obj;*.OBJ",
|
/* FT_OBJ */ "OBJ files (*.obj)|*.obj;*.OBJ",
|
||||||
/* FT_AMF */ "AMF files (*.amf)|*.zip.amf;*.amf;*.AMF;*.xml;*.XML",
|
/* FT_AMF */ "AMF files (*.amf)|*.zip.amf;*.amf;*.AMF;*.xml;*.XML",
|
||||||
/* FT_3MF */ "3MF files (*.3mf)|*.3mf;*.3MF;",
|
/* FT_3MF */ "3MF files (*.3mf)|*.3mf;*.3MF;",
|
||||||
/* FT_PRUSA */ "Prusa Control files (*.prusa)|*.prusa;*.PRUSA",
|
/* FT_PRUSA */ "Prusa Control files (*.prusa)|*.prusa;*.PRUSA",
|
||||||
/* FT_GCODE */ "G-code files (*.gcode, *.gco, *.g, *.ngc)|*.gcode;*.GCODE;*.gco;*.GCO;*.g;*.G;*.ngc;*.NGC",
|
/* FT_GCODE */ "G-code files (*.gcode, *.gco, *.g, *.ngc)|*.gcode;*.GCODE;*.gco;*.GCO;*.g;*.G;*.ngc;*.NGC",
|
||||||
/* FT_MODEL */ "Known files (*.stl, *.obj, *.amf, *.xml, *.3mf, *.prusa)|*.stl;*.STL;*.obj;*.OBJ;*.amf;*.AMF;*.xml;*.XML;*.3mf;*.3MF;*.prusa;*.PRUSA",
|
/* FT_MODEL */ "Known files (*.stl, *.obj, *.amf, *.xml, *.3mf, *.prusa)|*.stl;*.STL;*.obj;*.OBJ;*.amf;*.AMF;*.xml;*.XML;*.3mf;*.3MF;*.prusa;*.PRUSA",
|
||||||
|
/* FT_PROJECT */ "Project files (*.3mf, *.amf)|*.3mf;*.3MF;*.amf;*.AMF",
|
||||||
|
|
||||||
/* FT_INI */ "INI files (*.ini)|*.ini;*.INI",
|
/* FT_INI */ "INI files (*.ini)|*.ini;*.INI",
|
||||||
/* FT_SVG */ "SVG files (*.svg)|*.svg;*.SVG",
|
/* FT_SVG */ "SVG files (*.svg)|*.svg;*.SVG",
|
||||||
@ -501,9 +502,9 @@ void GUI_App::load_project(wxWindow *parent, wxString& input_file)
|
|||||||
{
|
{
|
||||||
input_file.Clear();
|
input_file.Clear();
|
||||||
wxFileDialog dialog(parent ? parent : GetTopWindow(),
|
wxFileDialog dialog(parent ? parent : GetTopWindow(),
|
||||||
_(L("Choose one file (3MF):")),
|
_(L("Choose one file (3MF/AMF):")),
|
||||||
app_config->get_last_dir(), "",
|
app_config->get_last_dir(), "",
|
||||||
file_wildcards(FT_3MF), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
|
file_wildcards(FT_PROJECT), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
|
||||||
|
|
||||||
if (dialog.ShowModal() == wxID_OK)
|
if (dialog.ShowModal() == wxID_OK)
|
||||||
input_file = dialog.GetPath();
|
input_file = dialog.GetPath();
|
||||||
|
@ -40,6 +40,7 @@ enum FileType
|
|||||||
FT_PRUSA,
|
FT_PRUSA,
|
||||||
FT_GCODE,
|
FT_GCODE,
|
||||||
FT_MODEL,
|
FT_MODEL,
|
||||||
|
FT_PROJECT,
|
||||||
|
|
||||||
FT_INI,
|
FT_INI,
|
||||||
FT_SVG,
|
FT_SVG,
|
||||||
|
@ -145,7 +145,7 @@ void MainFrame::update_title()
|
|||||||
wxString title = wxEmptyString;
|
wxString title = wxEmptyString;
|
||||||
if (m_plater != nullptr)
|
if (m_plater != nullptr)
|
||||||
{
|
{
|
||||||
wxString project = from_path(into_path(m_plater->get_project_filename()).filename());
|
wxString project = from_path(into_path(m_plater->get_project_filename()).stem());
|
||||||
if (!project.empty())
|
if (!project.empty())
|
||||||
title += (project + " - ");
|
title += (project + " - ");
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include <regex>
|
#include <regex>
|
||||||
#include <boost/algorithm/string/predicate.hpp>
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
#include <boost/algorithm/string/trim.hpp>
|
#include <boost/algorithm/string/trim.hpp>
|
||||||
|
#include <boost/algorithm/string/replace.hpp>
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
#include <boost/filesystem/path.hpp>
|
#include <boost/filesystem/path.hpp>
|
||||||
|
|
||||||
@ -2947,7 +2948,16 @@ const wxString& Plater::priv::get_project_filename() const
|
|||||||
|
|
||||||
void Plater::priv::set_project_filename(const wxString& filename)
|
void Plater::priv::set_project_filename(const wxString& filename)
|
||||||
{
|
{
|
||||||
m_project_filename = filename;
|
wxString copy = filename;
|
||||||
|
if (boost::algorithm::iends_with(copy, ".zip.amf"))
|
||||||
|
// we remove the .zip part of the extension
|
||||||
|
copy = boost::ireplace_last_copy(copy, ".zip.", ".");
|
||||||
|
|
||||||
|
// we force 3mf extension
|
||||||
|
boost::filesystem::path full_path = into_path(copy);
|
||||||
|
full_path.replace_extension("3mf");
|
||||||
|
|
||||||
|
m_project_filename = from_path(full_path);
|
||||||
wxGetApp().mainframe->update_title();
|
wxGetApp().mainframe->update_title();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user