From f60ddccd6d328a5cebc4d524246e33b399a8dfdd Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Thu, 6 Oct 2011 11:37:57 +0000 Subject: you can now hide and show drumlist instruments squashed some minor bugs --- muse2/muse/midiedit/dcanvas.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'muse2/muse/midiedit/dcanvas.h') diff --git a/muse2/muse/midiedit/dcanvas.h b/muse2/muse/midiedit/dcanvas.h index 9a45f6ac..8ecbdac9 100644 --- a/muse2/muse/midiedit/dcanvas.h +++ b/muse2/muse/midiedit/dcanvas.h @@ -73,6 +73,17 @@ struct instrument_number_mapping_t tracks=tr; pitch=p; } + + bool operator==(const instrument_number_mapping_t& that) //TODO maybe compare the Track* serial numbers, not the pointers themselves? + { + return (this->tracks == that.tracks && this->pitch==that.pitch); + } + + bool operator!=(const instrument_number_mapping_t& that) + { + return !operator==(that); + } + }; //--------------------------------------------------------- @@ -122,7 +133,7 @@ class DrumCanvas : public EventCanvas { signals: void newWidth(int); - void ourDrumMapChanged(); + void ourDrumMapChanged(bool /*instrumentMap changed as well?*/); private slots: void midiNote(int pitch, int velo); @@ -156,7 +167,7 @@ class DrumCanvas : public EventCanvas { int pitch_and_track_to_instrument(int pitch, Track* track); DrumMap* getOurDrumMap() { return ourDrumMap; } //FINDMICH UGLY int getOurDrumMapSize() { return instrument_map.size(); } //FINDMICH UGLY - + QVector& get_instrument_map() { return instrument_map; } //FINDMICH UGLY void propagate_drummap_change(int instrument); //FINDMICH move to drumedit void rebuildOurDrumMap(); }; -- cgit v1.2.3