Skip to content
Snippets Groups Projects
Commit df2fd405 authored by Peter Albrecht's avatar Peter Albrecht
Browse files

Use env var instead of data path

parent ed98c0ba
No related branches found
No related tags found
1 merge request!406Refactor skill memory GUI
......@@ -118,18 +118,14 @@ armarx::gui::getIcon(std::string name)
if (armarXGuiPath.empty())
{
std::scoped_lock l(m_armarXGuiPath);
armarXGuiPath = "ArmarXGui";
ArmarXDataPath::getAbsolutePath(armarXGuiPath, armarXGuiPath);
armarXGuiPath =
"$ARMARX_WORKSPACE/armarx/ArmarXGui/source/ArmarXGui/libraries/ArmarXGuiBase/icons/";
ArmarXDataPath::ReplaceEnvVars(armarXGuiPath);
}
std::cout << armarXGuiPath;
// now we can use the path!
// what in god's good name is "armarx/ArmarXGui/data/ArmarXGui"? And why does the util
// say ArmarXGui is in there???????
// anyways. workaround until I figure out what the hell happens here.
QPixmap pix(QString::fromStdString(
armarXGuiPath + "/../../source/ArmarXGui/libraries/ArmarXGuiBase/icons/" + name));
// we don't check the QIcon for validity, since an invalid icon can be safely used in the gui
QPixmap pix(QString::fromStdString(armarXGuiPath + name));
return QIcon(pix);
}
......@@ -20,7 +20,7 @@ namespace armarx::gui
/**
* @brief Get an icon in ArmarXGuiBase.
* @param name The name of the icon.
* @return The icon.
* @return The icon. Empty icon if not found.
*/
QIcon getIcon(std::string name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment