check for elementId besides the file name
This commit is contained in:
parent
7b6d50b3c6
commit
03495debc4
@ -87,13 +87,13 @@ void IconItem::setSource(const QVariant &source)
|
||||
m_svgIcon->setImagePath("toolbar-icons/" + source.toString().split("-").first());
|
||||
|
||||
//try as a svg normal icon (like systray)
|
||||
if (!m_svgIcon->isValid()) {
|
||||
if (!m_svgIcon->isValid() || !m_svgIcon->hasElement(m_source.toString())) {
|
||||
m_svgIcon->setImagePath("icons/" + source.toString().split("-").first());
|
||||
}
|
||||
m_svgIcon->setContainsMultipleImages(true);
|
||||
|
||||
//success?
|
||||
if (m_svgIcon->isValid()) {
|
||||
if (m_svgIcon->isValid() && m_svgIcon->hasElement(m_source.toString())) {
|
||||
m_icon = QIcon();
|
||||
|
||||
//ok, svg not available
|
||||
|
Loading…
Reference in New Issue
Block a user