Inputing Ottava Bassa via menu or shortcut shows it above staff

• Jul 4, 2021 - 04:32
Reported version
3.6
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

There is no problem if you use the palette, but the input from the menu cannot be done correctly.
Please see the image.
ottava.png


Comments

Title Input Otterva Bassa Input Ottava Bassa

Well, not really/completly wrong, it is an ottava basses, the notes do sound an octave lower, and the inspector knows it to be an ottava bassa.

Title Inputing Ottava Bassa via menu shows it above staff Inputing Ottava Bassa via menu or shortcut shows it above staff

Yes, a pure placement problem. Not too difficult to fix:

diff --git a/libmscore/edit.cpp b/libmscore/edit.cpp
index 145e05459..faaff2c00 100644
--- a/libmscore/edit.cpp
+++ b/libmscore/edit.cpp
@@ -1435,6 +1435,10 @@ void Score::cmdAddOttava(OttavaType type)
                        cr2 = cr1;
                   Ottava* ottava = new Ottava(this);
                   ottava->setOttavaType(type);
+                  if (type == OttavaType::OTTAVA_8VB/* || type == OttavaType::OTTAVA_15MB || type == OttavaType::OTTAVA_22MB*/) {
+                        ottava->setPlacement(Placement::BELOW);
+                        ottava->styleChanged();
+                        }
                   ottava->setTrack(cr1->track());
                   ottava->setTrack2(cr1->track());
                   ottava->setTick(cr1->tick());
@@ -1453,7 +1457,10 @@ void Score::cmdAddOttava(OttavaType type)
 
             Ottava* ottava = new Ottava(this);
             ottava->setOttavaType(type);
-
+            if (type == OttavaType::OTTAVA_8VB/* || type == OttavaType::OTTAVA_15MB || type == OttavaType::OTTAVA_22MB*/) {
+                  ottava->setPlacement(Placement::BELOW);
+                  ottava->styleChanged();
+                  }
             ottava->setTrack(cr1->track());
             ottava->setTrack2(cr1->track());
             ottava->setTick(cr1->tick());

No need to check for Ottava 15ma bassa and Ottava 22ma bassa, as there's no shortcut/command for those

I was looking at how to test, and the default shortcut I have defined for Ottava Bassa is "Ctrl+Y,Ctrl+O,Ctrl+B" - what does that mean? Certainly none of those work individually (they're already assigned to other actions!), and holding down Ctrl and typing YOB doesn't either. I could only test by assigning a different shortcut.
(Update: Ctrl+YOB does work if Redo is disabled, i.e. you're at the end of the undo stack. But that doesn't seem like that was the intention?)

holding down Ctrl and typing YOB works for me. And shows the same wrong behavoir as when using the menu. Which is no surprise, as it used the same command internally

Yes, I am sure. And on Windows 10.
Press Ctrl and hold it pressed, press and release Y, then O, then B, then release Ctrl.

Whatever, if that is an issue, it is a different one than this here

In reply to by SteveBlower

Well if it is what's expected then I wouldn't expect any of the default shortcut sequences to start with any of the other default ones, and especially not CTRL+Y! But I agree that in other applications, the moment you press Y when control is held down it activates Redo, so a shortcut sequence starting with CTRL+Y doesn't really make sense.
I agree it's not the issue described here, it was just making it hard to test.
I've already reported that shortcut key sequences don't work at all in MU4, which is the only place we'd be fixing it anyway.

Fix version
4.0.0