mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
Ignore gcode when selected multiple files
CURA-3495
This commit is contained in:
parent
208935960f
commit
42b8f06e99
1 changed files with 4 additions and 2 deletions
|
@ -733,20 +733,22 @@ UM.MainWindow
|
|||
// look for valid project files
|
||||
var projectFileUrlList = [];
|
||||
var hasGcode = false;
|
||||
var nonGcodeFileList = [];
|
||||
for (var i in fileUrls)
|
||||
{
|
||||
var endsWithG = /\.g$/;
|
||||
var endsWithGcode = /\.gcode$/;
|
||||
if (endsWithG.test(fileUrls[i]) || endsWithGcode.test(fileUrls[i]))
|
||||
{
|
||||
hasGcode = true;
|
||||
continue;
|
||||
}
|
||||
else if (CuraApplication.checkIsValidProjectFile(fileUrls[i]))
|
||||
{
|
||||
projectFileUrlList.push(fileUrls[i]);
|
||||
}
|
||||
nonGcodeFileList.push(fileUrls[i]);
|
||||
}
|
||||
hasGcode = nonGcodeFileList.length < fileUrls.length;
|
||||
|
||||
// show a warning if selected multiple files together with Gcode
|
||||
var hasProjectFile = projectFileUrlList.length > 0;
|
||||
|
@ -755,7 +757,7 @@ UM.MainWindow
|
|||
{
|
||||
infoMultipleFilesWithGcodeDialog.selectedMultipleFiles = selectedMultipleFiles;
|
||||
infoMultipleFilesWithGcodeDialog.hasProjectFile = hasProjectFile;
|
||||
infoMultipleFilesWithGcodeDialog.fileUrls = fileUrls.slice();
|
||||
infoMultipleFilesWithGcodeDialog.fileUrls = nonGcodeFileList.slice();
|
||||
infoMultipleFilesWithGcodeDialog.projectFileUrlList = projectFileUrlList.slice();
|
||||
infoMultipleFilesWithGcodeDialog.open();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue