Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes bug from issue #6002 #6803

Merged
merged 2 commits into from
Aug 12, 2023
Merged
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
11 changes: 9 additions & 2 deletions src/gui/tracks/TrackContentWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,7 @@ bool TrackContentWidget::canPasteSelection( TimePos clipPos, const QMimeData* md
QString value = decodeValue( md );

// We can only paste into tracks of the same type
if( type != ( "clip_" + QString::number( t->type() ) ) ||
m_trackView->trackContainerView()->fixedClips() == true )
if (type != ("clip_" + QString::number(t->type())))
{
return false;
}
Expand Down Expand Up @@ -360,6 +359,14 @@ bool TrackContentWidget::canPasteSelection( TimePos clipPos, const QMimeData* md
QDomElement clipParent = dataFile.content().firstChildElement("clips");
QDomNodeList clipNodes = clipParent.childNodes();

// If we are pasting into the PatternEditor, only a single Clip is allowed to be pasted
// so we don't have the unexpected behavior of pasting on different PatternTracks
if (m_trackView->trackContainerView()->fixedClips() == true &&
clipNodes.length() > 1)
{
return false;
}

// Determine if all the Clips will land on a valid track
for( int i = 0; i < clipNodes.length(); i++ )
{
Expand Down
Loading