Move confirmation to remove mixer channels outside MixerView::deleteChannel #7154)

Moves the confirmation to remove mixer channels outside of `MixerView::deleteChannel` and into `MixerChannelView::removeChannel`. This is so that the confirmation only applies when the user uses the context menu to remove a channel, which is important since no confirmation should apply when, for example, the mixer view is cleared with calls to `MixerView::clear`.
This commit is contained in:
Kevin Zander
2024-03-25 18:22:37 -05:00
committed by GitHub
parent 9ff63a5f5a
commit c2fdb8cfd2
4 changed files with 40 additions and 50 deletions

View File

@@ -104,6 +104,7 @@ namespace lmms::gui
void moveChannelRight();
private:
bool confirmRemoval(int index);
QString elideName(const QString& name);
MixerChannel* mixerChannel() const;
auto isMasterChannel() const -> bool { return m_channelIndex == 0; }

View File

@@ -78,7 +78,6 @@ public:
// notify the view that a mixer channel was deleted
void deleteChannel(int index);
bool confirmRemoval(int index);
// delete all unused channels
void deleteUnusedChannels();