diff options
-rw-r--r-- | Util/InstrumentPanel.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Util/InstrumentPanel.py b/Util/InstrumentPanel.py index 0c40f50..f1f7ab9 100644 --- a/Util/InstrumentPanel.py +++ b/Util/InstrumentPanel.py @@ -143,9 +143,13 @@ class InstrumentPanel(gtk.EventBox): def getInstrumentList(self,category = 'all'): instrumentList = [instrument for instrument in Config.INSTRUMENTS.keys() if instrument[0:4] != 'drum' and instrument[0:3] != 'mic' and instrument[0:3] != 'lab' and instrument[0:4] != 'guid'] + ['drum1kit', 'drum2kit', 'drum3kit'] + + if self.enterMode: + instrumentList = [instrument for instrument in Config.INSTRUMENTS.keys() if instrument[0:4] != 'drum' and instrument[0:3] != 'mic' and instrument[0:3] != 'lab' and instrument[0:4] != 'guid'] + if category != 'all': instrumentList = [instrument for instrument in Config.INSTRUMENTS.keys() if instrument[0:4] != 'drum' and instrument[0:3] != 'mic' and instrument[0:3] != 'lab' and instrument[0:4] != 'guid' and Config.INSTRUMENTS[instrument].category == category] - if category == 'percussions': + if category == 'percussions' and not self.enterMode: instrumentList = ['drum1kit', 'drum2kit', 'drum3kit'] + instrumentList #instrumentList = instrumentList.sort(lambda g,l: cmp(Config.INSTRUMENTS[g].category, Config.INSTRUMENTS[l].category) ) return instrumentList |