Crash on right-click / Edit Element with a different element selected
1) default score
2) single-click a barline to select it
3) without deselecting the first barline, right-click a different barline, thus bringing up the content menu on the second barline even though the first is selected
4) Edit Element
Result: crash, in drawEditMode, dereferencing a null pointer.
We can test and avoid that particular crash, but there are other interesting bad effects (click a text element, right-click a rest, Edit Element - status bar will claim you're in text edit mode rather than edit mode). Root of the problem is that ScoreView::cmd() is calling startEditMode on the selected element, which is not what you right-clicked. Well, the real problem is probably that we are hitting ScoreView::cmd() at all, really we should be using the handler for edit-element in ScoreView::objectPopup(). I guess the command form is taking precedence. Not sure why or what the right fix is.