the Chromebooks share their file system to Linux using the 9p file
system, which does not support setting file ownership. Newly PrusaSlicer
will detect platform and it will not panick if copy_file() cannot set
file ownership after copying. It just logs the incident, and on
chromebooks the loglevel for that incident is "Info", not "Error".
Adjusted the full screen mode to contain menu bar.
Moved Platform.cpp/hpp to libslic3r
ModelObject::split() expects a non-NULL new_objects vector where it adds pointers to the new models resulting from the split.
But in the CLI case the caller does not care about this and passes NULL which causes a crash. To fix the crash we could pass
a dummy vector but it turns out that we actually have a use for the results because we should assign a unique name to each
new model the same way as the GUI does. These names show up as comments in the gcode so this change makes the gcode produced
by the GUI and the CLI more similar and diffable.
@lukasmatena has amended the original commit by @combolek (pull request #5991) in order to avoid code duplication
".gcode", ".gco", ".g" and ".ngc" were considered to be G-code file
extensions by the G-code import / export file dialogs, but not by
various other functions. Now the G-code extension is tested by
a single function is_gcode_file(string).
Implemented try/catch blocks for Slic3r exceptions and std::exceptions
with GUI error reporting. This is extremely important to report
corruption of PrusaSlicer.ini.
The following threads are named with this commit:
slic3r_main, slic3r_BackgroundSlicingProcess,
slic3r_tbbpool_xx_yy where xx is a one based index of the TTB thread
and yy is the platform thread ID.
on application start-up, at least not on Windows.
wxEVT_CREATE was called for some control deep in the Plater, however
the event was delivered to the main frame and only for slicer, not
for G-code viewer. Thus the callbacks for 3D Mouse were not registered
for and the 3D mouse did not work on Windows.
Fixed by calling the callback registration from the first execution
of the Idle function.
Splash Screen under OSX requires a call of wxYeild() for update.
But wxYield() furthers a case, when CallAfter() in CLI::run() was called at the wrong time, before some of the GUI was created.
So, there is workaround:
Parameters needed for later loads are encapsulated to GUI_App::AFTER_INIT_LOADS structure
and are used in GUI_App::AFTER_INIT_LOADS::on_loads which is called just ones after wxEVT_IDLE
check for other instances during startup
send message with command line arguments if found and terminate
listen for those messages and load objects from paths in messages from them