Properly selecting toolbar actions (Qt 5.15?)

This commit is contained in:
Matthias Koefferlein 2022-09-03 16:59:17 +02:00
parent f788818d12
commit 0bbf4ad81c
1 changed files with 2 additions and 3 deletions

View File

@ -1707,9 +1707,8 @@ MainWindow::select_mode (int m)
std::vector<std::string> items = menu ()->items ("@toolbar"); std::vector<std::string> items = menu ()->items ("@toolbar");
for (std::vector<std::string>::const_iterator i = items.begin (); i != items.end (); ++i) { for (std::vector<std::string>::const_iterator i = items.begin (); i != items.end (); ++i) {
Action *a = menu ()->action (*i); Action *a = menu ()->action (*i);
if (a->is_checkable() && a->is_for_mode (m_mode)) { if (a->is_checkable()) {
a->set_checked (true); a->set_checked (a->is_for_mode (m_mode));
break;
} }
} }