Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/InstrumentTrackView.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class InstrumentTrackView : public TrackView


private slots:
void onInstrumentChanged();
void toggleInstrumentWindow( bool _on );
void toggleMidiCCRack();
void activityIndicatorPressed();
Expand Down
13 changes: 13 additions & 0 deletions src/gui/tracks/InstrumentTrackView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV
connect(ConfigManager::inst(), SIGNAL(valueChanged(QString,QString,QString)),
this, SLOT(handleConfigChange(QString,QString,QString)));

connect(_it, &InstrumentTrack::instrumentChanged, this, &InstrumentTrackView::onInstrumentChanged);

m_mixerChannelNumber = new MixerChannelLcdSpinBox(2, getTrackSettingsWidget(), tr("Mixer channel"), this);
m_mixerChannelNumber->show();

Expand Down Expand Up @@ -167,6 +169,8 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV
m_activityIndicator, SLOT(noteEnd()));

setModel( _it );

onInstrumentChanged();
}


Expand Down Expand Up @@ -300,6 +304,15 @@ void InstrumentTrackView::dropEvent( QDropEvent * _de )



void InstrumentTrackView::onInstrumentChanged()
{
// Check if an instrument has been loaded, if not disable the track label button to prevent opening an empty instrument window.
m_tlb->setEnabled(model()->m_instrument != nullptr);
}




void InstrumentTrackView::toggleInstrumentWindow( bool _on )
{
if (_on && ConfigManager::inst()->value("ui", "oneinstrumenttrackwindow").toInt())
Expand Down
Loading