diff options
Diffstat (limited to 'muse2/muse/midiedit')
-rw-r--r-- | muse2/muse/midiedit/ecanvas.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/midiedit/scoreedit.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/muse2/muse/midiedit/ecanvas.cpp b/muse2/muse/midiedit/ecanvas.cpp index 6907c014..9b51c653 100644 --- a/muse2/muse/midiedit/ecanvas.cpp +++ b/muse2/muse/midiedit/ecanvas.cpp @@ -154,7 +154,7 @@ void EventCanvas::songChanged(MusECore::SongChangedFlags_t flags) // (same in waveview.cpp) bool curItemNeedsRestore=false; MusECore::Event storedEvent; - int partSn; + int partSn = 0xDEADBEEF; // to prevent compiler warning; partSn is unused anyway if curItemNeedsRestore==false. if (curItem) { curItemNeedsRestore=true; diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp index aa22ce68..e274769d 100644 --- a/muse2/muse/midiedit/scoreedit.cpp +++ b/muse2/muse/midiedit/scoreedit.cpp @@ -3183,6 +3183,10 @@ void ScoreCanvas::draw_items(QPainter& p, int y_offset, staff_t& staff, ScoreIte case COLOR_MODE_VELO: color_index=VELO_PIXMAP_BEGIN + it->source_event->velo(); break; + + default: + cerr << "ERROR: THIS CANNOT HAPPEN: coloring_mode (="<<coloring_mode<<") is invalid! defaulting to black." << endl; + color_index=BLACK_PIXMAP; } if (it->source_event->selected()) @@ -3224,6 +3228,8 @@ void ScoreCanvas::draw_items(QPainter& p, int y_offset, staff_t& staff, ScoreIte case NONE: acc_pix=pix_noacc; break; case SHARP: acc_pix=pix_sharp; break; case B: acc_pix=pix_b; break; + default: cerr << "ERROR: THIS CANNOT HAPPEN: it->pos.vorzeichen (="<<it->pos.vorzeichen<<") is invalid! defaulting to NONE." << endl; + acc_pix=pix_noacc; break; } draw_pixmap(p,it->x-ACCIDENTIAL_DIST -x_pos+x_left,y_offset + it->y, acc_pix[color_index]); |