From 764788d8150555ffa13d1c22838565c5cd50a892 Mon Sep 17 00:00:00 2001 From: Robert Jonsson Date: Wed, 27 Oct 2010 20:48:30 +0000 Subject: Fixed keyboard shortcuts for tools and changed setOn to setChecked, should be changed for all QActions as setOn is deprecated --- muse2/muse/widgets/tools.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/muse2/muse/widgets/tools.cpp b/muse2/muse/widgets/tools.cpp index ec80230a..74c3eea7 100644 --- a/muse2/muse/widgets/tools.cpp +++ b/muse2/muse/widgets/tools.cpp @@ -5,6 +5,7 @@ // (C) Copyright 1999 Werner Schweer (ws@seh.de) //========================================================= +#include #include "tools.h" //#include //#include @@ -128,7 +129,8 @@ void EditToolBar::set(int id) for (int i = 0; i < nactions; ++i) { Action* action = actions[i]; if (action->id() == id) { - action->setOn(true); + action->setChecked(true); + toolChanged(action); return; } } @@ -142,7 +144,7 @@ int EditToolBar::curTool() { for (int i = 0; i < nactions; ++i) { Action* action = actions[i]; - if (action->isOn()) + if (action->isChecked()) return action->id(); } return -1; -- cgit v1.2.3