Skip to content
Open
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
5 changes: 3 additions & 2 deletions src/gui/clips/MidiClipView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void MidiClipView::setGhostInAutomationEditor()
aEditor->setFocus();
}

void MidiClipView::resetName() { m_clip->setName(""); }
void MidiClipView::resetName() { m_clip->setName(""); update(); }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really useful to call update() here ?
I tested with this change reverted and haven't noticed any difference.




Expand All @@ -131,6 +131,7 @@ void MidiClipView::changeName()
RenameDialog rename_dlg( s );
rename_dlg.exec();
m_clip->setName( s );
update();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment

}


Expand Down Expand Up @@ -603,7 +604,7 @@ void MidiClipView::paintEvent( QPaintEvent * )
// Check whether we will paint a text box and compute its potential height
// This is needed so we can paint the notes underneath it.
bool const drawName = !m_clip->name().isEmpty();
bool const drawTextBox = !beatClip && drawName;
bool const drawTextBox = drawName && (!beatClip || m_clip->m_notes.empty());

// TODO Warning! This might cause problems if ClipView::paintTextLabel changes
int textBoxHeight = 0;
Expand Down