mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 19:12:38 -07:00
Start PrusaSlicer in gcode viewer mode when dragging and dropping a .gcode file on the application icon
This commit is contained in:
@@ -154,6 +154,17 @@ int CLI::run(int argc, char **argv)
|
||||
|
||||
// Read input file(s) if any.
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
#if ENABLE_GCODE_DRAG_AND_DROP_GCODE_FILES
|
||||
for (const std::string& file : m_input_files) {
|
||||
std::string ext = boost::filesystem::path(file).extension().string();
|
||||
if (boost::filesystem::path(file).extension().string() == ".gcode") {
|
||||
if (boost::filesystem::exists(file)) {
|
||||
start_as_gcodeviewer = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // ENABLE_GCODE_DRAG_AND_DROP_GCODE_FILES
|
||||
if (!start_as_gcodeviewer) {
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
for (const std::string& file : m_input_files) {
|
||||
|
||||
Reference in New Issue
Block a user