Skip to content

Commit

Permalink
FIX:load_svg api should check svg file type
Browse files Browse the repository at this point in the history
jira: none
Change-Id: Ie19b31bcf32bcc3db7a2d7beb3bc969d00e079a0
  • Loading branch information
Haidiye00 authored and lanewei120 committed Oct 15, 2024
1 parent aaac005 commit dac5e52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10464,6 +10464,9 @@ bool Plater::load_svg(const wxArrayString &filenames, bool from_toolbar_or_file_
deselect_all();
}
wxArrayString temp_filenames;
if (!boost::iends_with(filenames[i].ToStdString(), ".svg")) {
return false;
}
temp_filenames.push_back(filenames[i]);
const auto dlg_info = _L("Loading file") + ": " + filenames[i];
int progress_percent = static_cast<int>(100.0f * static_cast<float>(i) / static_cast<float>(filenames.size()));
Expand Down

0 comments on commit dac5e52

Please sign in to comment.