fix a warning in RELEASE mode reg. an unused variable
fix an MSVC warning reg. a local variable shadowing a class member
fix an MSVC warning reg. a local variable shadowing another local
variable
Resolves: https://musescore.org/en/node/296362
RNA and Nashville notations are implemented as chord smbols,
because much of the code is common between these,
but it doesn't work to use the regular chord symbol screenreader code.
For Nashville numbers, we need to get the root from the function rather than the rootTpc.
For RNA, we need to perform some rudimentary parsing to turn the Roman numerals into numbers
and substitute the accidentals.
Navigation within the palette tree is now done almost entirely with the
arrow keys. This reduces the number of times the user has to press Tab
or Shift+Tab to leave the palette tree and navigate to other widgets. It
also enables the current item to be preserved on returning to the tree.
Resolves: https://musescore.org/en/node/296127.
ScoreView::dragEnterEvent() must call event->accept() if event->dropAction() == Qt::CopyAction, even if for some reason (event->possibleActions() & Qt::CopyAction) evaluates to false, as is the case on macOS.
This adds a check for valid duration in ScoreView::cmdEnterRest() that was never strictly necessary before #5376 was merged. But now it is possible that the input state's duration may be invalid or equal to V_MEASURE, even if the check for invalid state does not cause the function to return early. If this is the case, we must set a valid duration at this time. Otherwise, this will result in an assertion failure in Score::makeGap().
A number of small issues prevent the special characters dialog
from working properly, especially for chord symbols.
Drag and drop only works with some symbols because FSYMBOL was missing
in the switch statements in dragdrop.cpp.
Text elements can handle drop of FSYMBOL (which is why double-click works),
but they weren't getting to chance during drag&drop.
Fix was just adding those case statements.
For Harmony objects, we also needed to add the handlers
in acceptDrop() and drop() (the latter just passing through to TextBase).
However, accidentals require special handling in Harmony::endEdit() in order to parse.
Code was added recently to do this, but it didn't actually work
(I suspect it did when written, but things changed between then and when it was merged).
I rearranged the code in in Harmony::endEdit() a bit - and added comments to explain.
Basically, setHarmony() needs to be called *after* the back-substitution
(replacing flat with "b", sharp with "#"),
but the back-substitution needs to happen after TextBase::endEdit() finalizes the text
(actually, if it were possible to substitute before, that would be better,
but do to the way the undo records are munged in TextBase::endEdit(),
it seemed to dangerous to even try).
Bottom line: I do the TextBase::endEdit(), then the back-substitution,
then the setHarmony().
I needed to be sure to trigger a layout, which required a startCmd/endCmd pair
(since TextBase::endEdit() already called endCmd).
Resolves: https://musescore.org/en/node/296053
The algorithm for finding a start point for note input works well in most cases,
in particular, if a measure or a note or reset is selected.
The cases were nothing is selected, or an element other than a note or rest is selected,
are sometimes good, sometimes we give up too easily
and select the first (or first visible) measure.
This change improves the no selection case by using the last-selected CR if it is in view
(using the recently-added code for remembering the last selected position).
It improves the case of soemthing other than a note or rest select
by using the actual tick of the element
rather than trying to guess a tick by looking for a parent measure.
That works for elements that are ultimately parented by a measure,
but fails for things like spanners, which are children of the system.
It turns out that SpannerSegment had no tick() function, so this failed at first,
but I added an override, which may well fix some other bug somewhere.
Another side benefit of the change is that if select an element not at the start of the measure
(for examplea mid-measure staff text), input starts at that tick,
not at the beginning of the measure.
Plus:
- fix incorrect list of workspaces appeared in the View->Workspaces menu
- fix not updating the workspace combobox on removing workspaces and saving edited workspaces
- Basic/Advanced positions in the workspaces combobox are mixed if Advanced workspace has been selected in Startup Wizard
- Basic workspace appears as "edited" if we edit Advanced workspace (in case the latter has been selected in Startup Wizard)
- Rename "Undo Changes" to "Reset workspace". The operation reverts all the changes made in current workspace to the state of the `source` workspace. Newly created custom workspaces inherits `source` tag from the workspace they have been created from
- Resetting "Basic/Advanced edited" is performed by deleting the edited workspace and restoring Basic/Advanced one in the workspaces lists (the menu and the combobox)
- Correctly set `_sourceWorkspaceName` for newly created workspaces
- Move `defaultWorkspaces` and `defaultEditedWorkspaces` to reuse them outside the workspace.cpp file
- Fix logic on creating new workspaces to prevent changing current workspace (use `changeWorkspace` method)
- Complete `remove` method
- Fix typo in `defaultEditedWorkspaces` variable
* Introduce visible workspaces that are workspaces to be shown in GUI
* Introduce method `findByTranslatableName` to be used when seeking `sourceWorkspace`
- Try to return focus to palette after closing palette-related
dialogs
- Show delete confirmation only once when deleting multiple cells
- Add plurals to palettes dialogs