Patternview: improve note drawing code, fix bugs (fixes #419)