channel drag copy: fix channel copying code (thanks tildearrow & eknous)
This commit is contained in:
parent
1099c79ec8
commit
b8ce3219eb
1 changed files with 10 additions and 2 deletions
|
|
@ -612,8 +612,16 @@ void DivEngine::copyChannel(int src, int dest) {
|
|||
|
||||
for (int i=0; i<DIV_MAX_PATTERNS; i++) {
|
||||
curOrders->ord[dest][i]=curOrders->ord[src][i];
|
||||
if (curPat[src].data[i]!=NULL && curPat[dest].data[i]!=NULL) {
|
||||
curPat[src].data[i]->copyOn(curPat[dest].data[i]);
|
||||
|
||||
DivPattern* srcPat=curPat[src].data[i];
|
||||
DivPattern* destPat=curPat[dest].data[i];
|
||||
if (srcPat==NULL) {
|
||||
if (destPat!=NULL) {
|
||||
delete destPat;
|
||||
curPat[dest].data[i]=NULL;
|
||||
}
|
||||
} else {
|
||||
curPat[src].data[i]->copyOn(curPat[dest].getPattern(i, true));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue