Double assignment for the same variable in Shortcut constructor
I've noticed that in this code the cont paramter is ignored, because imediatly after the assignemt
_context = cont;
_context get thes default value for a Shortcut, Qt::WindowShortcut.
Since nobody has complained about this before I've created this bug report to ask if I should remove the second assignment, or it is by design.
Shortcut::Shortcut(int s, int f, const char* name, Qt::ShortcutContext cont,
const char* txt, int i)
{
_key = name;
_text = txt;
_descr = _text;
_help = _descr;
_state = s;
_flags = f;
_standardKey = QKeySequence::UnknownKey;
_context = cont;
_context = Qt::WindowShortcut;
_icon = i;
_action = 0;
}
Comments
Seems that code was added here:
https://github.com/musescore/MuseScore/commit/add7f7f82b5b9a6116be1983a…
Looks like a typo / copy & paste error.
Duplicate post
Fixed in f167972c81
Automatically closed -- issue fixed for 2 weeks with no activity.