Skip to content

Commit

Permalink
Correclty load icons of panels with whitespaces in their name (#1241)
Browse files Browse the repository at this point in the history
  • Loading branch information
roncapat authored Jul 18, 2024
1 parent 85dfbef commit d390a55
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ class PluginlibFactory : public ClassIdRecordingFactory<Type>
return loadPixmap(default_icon_path);
}

auto base_path = "package://" + info.package + "/icons/classes/" + info.name;
auto encoded_name = info.name;
encoded_name.replace(" ", "%20");
auto base_path = "package://" + info.package + "/icons/classes/" + encoded_name;
QIcon icon = loadPixmap(base_path + ".svg");
if (icon.isNull()) {
icon = loadPixmap(base_path + ".png");
Expand Down

0 comments on commit d390a55

Please sign in to comment.