Commit graph

1412 commits

Author SHA1 Message Date
lasconic
0237dd33cc fix mtest 2017-03-31 14:02:05 +02:00
Werner Schweer
ac41fa396e update edit infrastructure 2017-03-31 13:03:30 +02:00
Eric Fontaine
4627c59003 fix #184376 ExportMidi::writeHeader() initial keysig overwrite
ExportMidi::writeHeader() would incorrectly write a default C keysig at tick 0 for every iteration through the RepeatList that did not contain a keysig.  This meant that if there was an initial keysig, it would have been effectively overwritten it any sections in the RepeatList do not contain any keysig element.

The fix is to only write the fall back default initial C key sig if no key sigs were found at tick 0.
2017-03-29 17:36:45 +02:00
lasconic
60d97e7d39 add mtest for #184061 2017-03-29 00:53:02 +02:00
lasconic
c08b67ff90 fix #183846 split irreg-len meas shouldn't add rest
This fixes an bug which produced corrupted measures when splitting irregular length measures.  In Score::cmdSplitMeasure() after the newly split measures are first created, if their new actual length was greater than their nominal length, then Measure::adjustToLen() would append additional padding rests at the end of the measure.  However, the subsequent range.write() assumed that the measures were entirely empty before copying contents from the original measure into the new measures.  The extra padding rests were unnecessary, and caused the resulting measures to contain too many notes than their actual length, hence the corruption.

The fix here is to add a default boolean parameter to adjustToLen() called appendRestsIfNecessary which is true by default so as to not change behavior when it is called without specifiying the parameter. However, cmdSplitMeasure() will call adjustToLen with that boolean explicitly false, so that the new measures don't get unnecessary rests.
2017-03-24 17:31:25 +01:00
Nicolas Froment
4b2df3e81a Merge pull request #3104 from ericfont/test-Q-W-ShiftQ-ShiftW
Basic Tests for Q, W, Shift+Q, Shift+W
2017-03-24 10:11:18 +01:00
Eric Fontaine
99d159e48a Basic Tests for Q, W, Shift+Q, Shift+W
Tests for basic functionally.  Going between 128th duration & whole duration and applies commands 'half-duration', 'double-duration', 'dec-duration-dotted', 'inc-duration-dotted'

Class Score gets methods cmdDoubleDuration(), cmdHalfDuration(), cmdIncDurationDotted(), cmdDecDurationDotted() which are public wrappers around private method cmdIncDecDurationDotted.

Simplified the text description of the commands
2017-03-24 02:12:40 -04:00
Eric Fontaine
2ad3507ebb Test case for #183746 Crash entering long note after short one
Tries to add long note (breve) after a short 128th rest without crashing.  Verifies that the resulting notes are tied over at least 3 times (to span 3 measures) and have total duration the same as a breve.
2017-03-23 10:00:04 -04:00
Werner Schweer
164d3b45f2 mtest: enable libmscore/measure: insertMeasureEnd 2017-03-17 10:24:42 +01:00
Werner Schweer
87913c6754 hairpin updates 2017-03-16 12:13:35 +01:00
Werner Schweer
260d790379 fix mtest join 2017-03-14 18:11:40 +01:00
Werner Schweer
d9ff5a26f6 misc. layout fixes 2017-03-14 17:00:49 +01:00
Nicolas Froment
1126ab7702 Merge pull request #3043 from ericfont/179726-DropNormalBarlineTest2
BarLine mtest #179726 additional cases
2017-03-09 22:28:08 +01:00
lasconic
deb4f37c2a fix mtest 2017-03-09 21:49:01 +01:00
Werner Schweer
cf42a3a377 fix #179926: add scale property for time signature 2017-03-09 13:37:53 +01:00
Eric Fontaine
8ec9a6cdbd BarLine mtest #179726 additional cases
If an END_START_REPEAT straddles a newline, then:

1. dropping a NORMAL barline on the END_REPEAT will turn the END_REPEAT into NORMAL, but keep the START_REPEAT.

2. dropping a NORMAL barline on the START_REPEAT will remove the START_REPEAT, but keep the END_REPEAT.
2017-03-08 12:49:20 -05:00
Werner Schweer
867f2582f6 move Segment::Type into SegmentType 2017-03-08 13:12:26 +01:00
Nicolas Froment
e2d682e141 Merge pull request #3040 from lvinken/musicxml-fixes
fix #175226 - [MusicXML import] add instrument-sound to MIDI mapping
2017-03-08 08:57:44 +01:00
Eric Fontaine
3069f2202a BarLine mtest for #179726
Dropping a normal barline onto a pre-existing barline should either turn it into a Normal barline, or if was StartRepeatBarLine, should remove the barline segment.
2017-03-07 16:10:15 -05:00
Leon Vinken
161639f719 fix #175226 - [MusicXML import] add instrument-sound to MIDI mapping 2017-03-07 21:48:45 +01:00
Werner Schweer
915a3844a7 update mtest, gp import 2017-03-06 11:33:54 +01:00
Eric Fontaine
8ad0e680aa Text::drop when not already in edit mode needs to handle Supplementary Unicode 2017-02-25 11:20:23 -05:00
Eric Fontaine
1a9812d8cf mtest for dropping unicode after Symbol when cursor currently already set to SYMBOL 2017-02-25 09:37:25 -05:00
lasconic
78051af6ed enable MusicXML mtest 2017-02-25 12:27:49 +01:00
lasconic
702a9f8a4b remove comments 2017-02-25 10:46:47 +01:00
Nicolas Froment
4fd002088a Merge pull request #3020 from ericfont/176601-InsertMultiByteChar
fix #176601 unicode insert Upper & Lower Surrogates simultaneously
2017-02-25 10:36:06 +01:00
Eric Fontaine
2d6ce9c635 fix #176601 Supplemental Unicode select, insert, paste
Any operations dealing with Supplemental Unicode must operate on high & low surrogates simulatenously, since they belong together as a pair:
-Text::insert method has a new version of which takes two QChars as input (the high & low surrogates), and inserts them together before incrementing the cursor.
-TextBlock::fragment method now has return parameter ridx (relative QChar index) in addition to rcol (relative cursor position).  For Basic Unicode TextFragments, ridx will be same as rcol, since each Basic Unicode char is one QChar.  But for text that has Supplemental Unicode, ridx will be be different since each Supplemental Unicode char is two QChars.
-TextBlock::text method now includes any high surrogate QChars in the returned string.  Previously, this method simply skipped over QChars that were high surrogates.  When iterating over the TextFragment, only increments col when comming across a QChar that is not a high surrogate.
-Text::createLayout, Text::paste and Text::drop methods now uses the new Text::insert method to insert both high & low surrogates together.  Previously, the cursor position would get messed up when each QChar was added seperately.
-TextBlock::remove(int start, int n) will now add both QChars of the surrogate pair to the return string.

Also was issue with adding text after a SMUFL symbol if the cursor mode was already in SMUFL.  Fixed by making sure to append a new TextFragment regardless of state of cursor, and also making TextFragment::TextFragment(TextCursor* cursor, const QString& s) constructor set the type to CharFormatType::TEXT.
2017-02-23 11:51:38 -05:00
Werner Schweer
c4b477bab2 fixes for layout, align property 2017-02-23 11:42:03 +01:00
Eric Fontaine
1b67e23194 fix #176151 MultiByte char TextBlock::remove()
Previously TextBlock::remove() did not delete Supplementary Multilingual Plane Unicode chars correctly.

Added tests using deletePreviousChar() for SMP Unicode as well as regular BMP Unicode as well as for text that has mixed BMP, SMP, and SMUFL symbols.
2017-02-22 08:33:39 -05:00
Werner Schweer
fc55143b95 update mtest 2017-02-17 15:48:28 +01:00
Werner Schweer
723015c2a3 fix import problem of 2.x files with parts 2017-02-16 11:18:01 +01:00
Nicolas Froment
dc2eb11a98 Merge pull request #2952 from IsaacWeiss/153891-electric-bass-clef
Fix #153891: Make electric basses transposing instruments with regular bass clef
2017-02-15 18:07:45 +01:00
Werner Schweer
8974b275ee reactivate compat206 regression tests 2017-02-15 17:50:59 +01:00
Werner Schweer
fa25d23bdc fix deleting measures 2017-02-15 13:59:06 +01:00
Werner Schweer
6b0a1e6c1e fix hairpin import of 2.0x files 2017-02-15 13:59:06 +01:00
Werner Schweer
bfebf95b66 update inspector for lyrics 2017-02-12 10:31:19 +01:00
Werner Schweer
b92296da04 Merge pull request #2988 from AntonioBL/gp6ottava
fix #70571 fix #93116 [GP6] crash when importing gpx ottava
2017-02-10 15:30:32 +01:00
AntonioBL
07c5181cb6 fix #70571 fix #93116 [GP6] crash when importing gpx ottava 2017-02-09 16:48:03 +01:00
Werner Schweer
f94b780f2b fix debugging code for CmdState 2017-02-09 16:07:07 +01:00
Werner Schweer
a53bf1e2c3 some 2xx compatibility fixes 2017-02-09 11:57:10 +01:00
Werner Schweer
fe8a3e5e9c move textline properties to inspector 2017-02-07 18:48:41 +01:00
Nicolas Froment
101541c7f8 Merge pull request #2974 from NetForce1/165496-import-midi-track-volume
fix #165496: Import MIDI track volume
2017-02-02 10:07:11 +01:00
Werner Schweer
902a5f7add remove obsolete 'Album'; style updates 2017-01-31 12:22:05 +01:00
Daan de Wit
7e65c70341 fix #165496: Import MIDI track volume
Import the volume of a MIDI track when that track contains a single
volume control event at tick 0.
2017-01-28 19:47:36 +01:00
Werner Schweer
6ecd806ff3 better bw. compatibility 2017-01-25 15:55:04 +01:00
Werner Schweer
9a9dedf774 change PageFormat to simple style values 2017-01-23 21:53:51 +01:00
Werner Schweer
e8621b8e2a fingering layout update; fixed layout bugs 2017-01-19 16:06:40 +01:00
Werner Schweer
e4f86712a4 update mtest 2017-01-19 10:16:36 +01:00
Werner Schweer
1d4c6b2f21 move Element::type() to ScoreElement 2017-01-18 14:16:33 +01:00
Werner Schweer
5433d719d9 replace TextStyle by SubStyle 2017-01-16 20:59:21 +01:00