changed handling of scene toolbar button icons

actorid
Marc Zinnschlag 11 years ago
parent 74cee66273
commit 4624bed899

@ -11,11 +11,6 @@ CSVWorld::SceneTool::SceneTool (SceneToolbar *parent) : QPushButton (parent)
connect (this, SIGNAL (clicked()), this, SLOT (openRequest()));
}
void CSVWorld::SceneTool::updateIcon (const QIcon& icon)
{
setIcon (icon);
}
void CSVWorld::SceneTool::openRequest()
{
showPanel (parentWidget()->mapToGlobal (pos()));

@ -18,10 +18,6 @@ namespace CSVWorld
virtual void showPanel (const QPoint& position) = 0;
protected slots:
void updateIcon (const QIcon& icon);
private slots:
void openRequest();

@ -36,6 +36,9 @@ void CSVWorld::SceneToolMode::addButton (const std::string& icon, const std::str
mButtons.insert (std::make_pair (button, id));
connect (button, SIGNAL (clicked()), this, SLOT (selected()));
if (mButtons.size()==1)
setIcon (button->icon());
}
void CSVWorld::SceneToolMode::selected()
@ -47,7 +50,7 @@ void CSVWorld::SceneToolMode::selected()
{
mPanel->hide();
emit updateIcon (iter->first->icon());
setIcon (iter->first->icon());
emit modeChanged (iter->second);
}
}
Loading…
Cancel
Save