Fix display of toolbar icons after r31255.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31387 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2009-09-13 18:09:40 +00:00
parent 08fa11894f
commit b43aa05ff1

View File

@ -175,7 +175,12 @@ MenuButton::MenuButton(GuiToolbar * bar, ToolbarItem const & item, bool const st
setToolTip(label);
setStatusTip(label);
setText(label);
setIcon(QIcon(getPixmap("images/math/", toqstr(tbitem_.name_), "png")));
QString const name = toqstr(tbitem_.name_);
FileName fname = libFileSearch("images/math/", name, "png");
if (fname.exists())
setIcon(QIcon(getPixmap("images/math/", name, "png")));
else
setIcon(QIcon(getPixmap("images/", name, "png")));
if (sticky)
connect(this, SIGNAL(triggered(QAction *)),
this, SLOT(actionTriggered(QAction *)));