diff --git a/include/MixerChannelView.h b/include/MixerChannelView.h index 65a9a507fd9..fc9844a4c8b 100644 --- a/include/MixerChannelView.h +++ b/include/MixerChannelView.h @@ -57,7 +57,7 @@ namespace lmms::gui None, SendToThis, ReceiveFromThis }; - MixerChannelView(int channelIndex, MixerView* mixerView, QWidget* parent = nullptr); + MixerChannelView(QWidget* parent, MixerView* mixerView, int channelIndex); void paintEvent(QPaintEvent* event) override; void contextMenuEvent(QContextMenuEvent*) override; void mousePressEvent(QMouseEvent*) override; diff --git a/src/gui/MixerChannelView.cpp b/src/gui/MixerChannelView.cpp index 94b64886581..aad76699bb2 100644 --- a/src/gui/MixerChannelView.cpp +++ b/src/gui/MixerChannelView.cpp @@ -43,7 +43,7 @@ namespace lmms::gui { - MixerChannelView::MixerChannelView(int channelIndex, MixerView* mixerView, QWidget* parent) : + MixerChannelView::MixerChannelView(QWidget* parent, MixerView* mixerView, int channelIndex) : QWidget(parent), m_mixerView(mixerView), m_channelIndex(channelIndex) diff --git a/src/gui/MixerView.cpp b/src/gui/MixerView.cpp index e340709d8d9..b7a1daa9bb6 100644 --- a/src/gui/MixerView.cpp +++ b/src/gui/MixerView.cpp @@ -102,7 +102,7 @@ MixerView::MixerView() : // add master channel m_mixerChannelViews.resize(m->numChannels()); - m_mixerChannelViews[0] = new MixerChannelView(0, this, this); + m_mixerChannelViews[0] = new MixerChannelView(this, this, 0); m_racksLayout->addWidget(m_mixerChannelViews[0]->m_effectRackView); @@ -114,7 +114,7 @@ MixerView::MixerView() : // add mixer channels for (int i = 1; i < m_mixerChannelViews.size(); ++i) { - m_mixerChannelViews[i] = new MixerChannelView(i, this, m_channelAreaWidget); + m_mixerChannelViews[i] = new MixerChannelView(m_channelAreaWidget, this, i); chLayout->addWidget(m_mixerChannelViews[i]); } @@ -187,7 +187,7 @@ int MixerView::addNewChannel() Mixer * mix = Engine::mixer(); int newChannelIndex = mix->createChannel(); - m_mixerChannelViews.push_back(new MixerChannelView(newChannelIndex, this, m_channelAreaWidget)); + m_mixerChannelViews.push_back(new MixerChannelView(m_channelAreaWidget, this, newChannelIndex)); chLayout->addWidget(m_mixerChannelViews[newChannelIndex]); m_racksLayout->addWidget(m_mixerChannelViews[newChannelIndex]->m_effectRackView); @@ -213,7 +213,7 @@ void MixerView::refreshDisplay() m_mixerChannelViews.resize(Engine::mixer()->numChannels()); for (int i = 1; i < m_mixerChannelViews.size(); ++i) { - m_mixerChannelViews[i] = new MixerChannelView(i, this, m_channelAreaWidget); + m_mixerChannelViews[i] = new MixerChannelView(m_channelAreaWidget, this, i); chLayout->addWidget(m_mixerChannelViews[i]); m_racksLayout->addWidget(m_mixerChannelViews[i]->m_effectRackView); }