Do not allow dragging of cuts (child items)

Use enum values for indexing columns
This commit is contained in:
Patrick Linstruth
2018-10-07 13:20:57 -07:00
parent 4dc684ebc2
commit af8b787e4c

View File

@@ -20,7 +20,7 @@
// //
#include <rdcartdrag.h> #include <rdcartdrag.h>
#include <rdlibrary.h>
#include <rdlistviewitem.h> #include <rdlistviewitem.h>
#include "globals.h" #include "globals.h"
@@ -50,10 +50,10 @@ void LibListView::contentsMouseMoveEvent(QMouseEvent *e)
if(item==NULL) { if(item==NULL) {
return; return;
} }
if(item->text(21).isEmpty()) { // Voice tracks cannot be dragged if(item->text(MainWidget::OwnedBy).isEmpty()&&!item->parent()) { // Voice tracks and cuts cannot be dragged
RDCartDrag *d= RDCartDrag *d=
new RDCartDrag(item->text(1).toUInt(),item->text(4),item->textColor(2), new RDCartDrag(item->text(MainWidget::Cart).left(6).toUInt(),item->text(MainWidget::Title),
this); item->textColor(MainWidget::Group), this);
d->dragCopy(); d->dragCopy();
emit clicked(item); emit clicked(item);
} }