Fixed #48 (Cancel does not reset current tool)

This commit is contained in:
Matthias Koefferlein 2017-12-27 21:33:38 +01:00
parent 395643b427
commit 87531dadcc
1 changed files with 1 additions and 1 deletions

View File

@ -2327,7 +2327,7 @@ MainWindow::select_mode (int m)
std::vector<std::string> items = menu ()->items ("@toolbar");
for (std::vector<std::string>::const_iterator i = items.begin (); i != items.end (); ++i) {
Action a = menu ()->action (*i);
if (a.qaction ()->data ().toInt () == m_mode) {
if (a.qaction ()->isCheckable() && a.qaction ()->data ().toInt () == m_mode) {
a.set_checked (true);
break;
}