mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
File->Open Project allows to load .amf files
This commit is contained in:
parent
68bffee102
commit
8ae1dfd4d0
4 changed files with 23 additions and 11 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <regex>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/algorithm/string/trim.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <boost/optional.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)
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue