Skip to content

Commit 3529b1b

Browse files
committed
merge MidiClip::{empty,isEmpty}
1 parent 0b763d2 commit 3529b1b

4 files changed

Lines changed: 5 additions & 8 deletions

File tree

include/MidiClip.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,7 @@ class LMMS_EXPORT MidiClip : public Clip
112112
return m_instrumentTrack;
113113
}
114114

115-
// TODO: does this need to be distinct from isEmpty()?
116-
bool empty() const;
117-
118-
bool isEmpty() const override { return empty(); }
115+
bool isEmpty() const override;
119116

120117
gui::ClipView * createView( gui::TrackView * _tv ) override;
121118

src/gui/clips/MidiClipView.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,13 @@ void MidiClipView::constructContextMenu( QMenu * _cm )
202202
this, SLOT(openInPianoRoll()));
203203

204204
auto b = new QAction(embed::getIconPixmap("ghost_note"), tr("Set as ghost in piano-roll"), _cm);
205-
if( m_clip->empty() ) { b->setEnabled( false ); }
205+
if( m_clip->isEmpty() ) { b->setEnabled( false ); }
206206
_cm->insertAction( _cm->actions()[1], b );
207207
connect( b, SIGNAL(triggered(bool)),
208208
this, SLOT(setGhostInPianoRoll()));
209209

210210
auto c = new QAction(embed::getIconPixmap("automation_ghost_note"), tr("Set as ghost in automation editor"), _cm);
211-
if (m_clip->empty()) { c->setEnabled(false); }
211+
if (m_clip->isEmpty()) { c->setEnabled(false); }
212212
_cm->insertAction(_cm->actions()[2], c);
213213
connect(c, &QAction::triggered, this, &MidiClipView::setGhostInAutomationEditor);
214214

src/gui/editors/PianoRoll.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5818,7 +5818,7 @@ void PianoRollWindow::exportMidiClip()
58185818
void PianoRollWindow::importMidiClip()
58195819
{
58205820
// Overwrite confirmation.
5821-
if (!m_editor->m_midiClip->empty() &&
5821+
if (!m_editor->m_midiClip->isEmpty() &&
58225822
QMessageBox::warning(
58235823
nullptr,
58245824
tr("Import clip."),

src/tracks/MidiClip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ void MidiClip::updatePatternTrack()
648648

649649

650650

651-
bool MidiClip::empty() const
651+
bool MidiClip::isEmpty() const
652652
{
653653
for (const auto& note : m_notes)
654654
{

0 commit comments

Comments
 (0)