Printing problem with page zero

• Jan 23, 2016 - 18:29
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Comments

  1. open attached score
  2. File → Print (or use the coresponding button in the tool bar)
  3. make sure 'All' is selected as the range to print
  4. hit "Print"

      Expexted result: All 4 pages get printed

      Actual result: Only the 1st page gets printed

      Workaround: Export as PDF and then print that

      Windows 7 (Enterprise, 64bit), MuseScore 2.0.2 as well as build from latest master branch, (6205e12). I see no reason to believe a build from the 2.0.3 branch would behave differently.

Attachment Size
PageNumberTest.mscz 2.19 KB

Same issue when printing to a PDF 'printer' ("Adobe Acrobat XI Pro"), also when using another 'virtual printer, "Microsoft XPS Document Writer".

Debugger session, breakpoint at mscore/file.cpp, line 1507, stepping thru...

pages is set to 4 (correct)
offset is set to -1 (correct)

fromPage is set to 0
toPage is set to 0 too (?!)

those 2 don't get adjusted in the following 2 if statements and then consequently the inner for loop (line 1519) runs from 0 to 0, i.e. just once.

I think it might work to change that 2nd if (line 1517) from '...toPage < 0...' to ...toPage <= 0...'

And it does, in a way... problem: when in the print dialog change from all to range, leaving that at the default of 1-4 (i.e. the entire range), only pages 2-4 get printed. This, however, is not any worse than without that change, so looks as being a different issue?

I wonder whehter we should apply the pageOffset further up only, before calling the dialog (line 1482)? And also adjust thise to if statements, to really allow negative numbers, if pageOffset asks for that?