use of de.mossgrabers.framework.daw.data.bank.IDrumPadBank in project DrivenByMoss by git-moss.
the class AbstractConfiguration method registerDeactivatedItemsHandler.
/**
* Register a handler for the 'exclude deactivated items' setting.
*
* @param model The model for getting the banks to configure
*/
public void registerDeactivatedItemsHandler(final IModel model) {
this.addSettingObserver(AbstractConfiguration.EXCLUDE_DEACTIVATED_ITEMS, () -> {
final boolean exclude = this.areDeactivatedItemsExcluded();
final ITrackBank trackBank = model.getTrackBank();
trackBank.setSkipDisabledItems(exclude);
for (int i = 0; i < trackBank.getPageSize(); i++) trackBank.getItem(i).getSendBank().setSkipDisabledItems(exclude);
final ITrackBank effectTrackBank = model.getEffectTrackBank();
if (effectTrackBank != null)
effectTrackBank.setSkipDisabledItems(exclude);
final ICursorDevice cursorDevice = model.getCursorDevice();
final IDeviceBank deviceBank = cursorDevice.getDeviceBank();
deviceBank.setSkipDisabledItems(exclude);
cursorDevice.getLayerBank().setSkipDisabledItems(exclude);
final IDrumPadBank drumPadBank = cursorDevice.getDrumPadBank();
if (drumPadBank != null)
drumPadBank.setSkipDisabledItems(exclude);
});
}
Aggregations