move serviceItemId changes to end of function
This commit is contained in:
parent
93f60ddf3b
commit
0ba6f9a2a9
1 changed files with 5 additions and 5 deletions
|
@ -574,11 +574,6 @@ void SlideModel::addItemFromService(const int &index, const ServiceItem &item) {
|
||||||
void SlideModel::insertItemFromService(const int &index, const ServiceItem &item) {
|
void SlideModel::insertItemFromService(const int &index, const ServiceItem &item) {
|
||||||
qDebug() << "***INSERTING SLIDE FROM SERVICEITEM***";
|
qDebug() << "***INSERTING SLIDE FROM SERVICEITEM***";
|
||||||
int slideId = findSlideIdFromServItm(index);
|
int slideId = findSlideIdFromServItm(index);
|
||||||
for (int i = slideId; i < rowCount(); i++) {
|
|
||||||
//increment serviceItemIds
|
|
||||||
m_items[i]->setServiceItemId(m_items[i]->serviceItemId() + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// inserting item
|
// inserting item
|
||||||
if (item.type() == "song") {
|
if (item.type() == "song") {
|
||||||
for (int i = 0; i < item.text().size(); i++) {
|
for (int i = 0; i < item.text().size(); i++) {
|
||||||
|
@ -610,6 +605,11 @@ void SlideModel::insertItemFromService(const int &index, const ServiceItem &item
|
||||||
"center", "center",
|
"center", "center",
|
||||||
index, 0, 1);
|
index, 0, 1);
|
||||||
}
|
}
|
||||||
|
for (int i = slideId; i < rowCount(); i++) {
|
||||||
|
//increment serviceItemIds
|
||||||
|
m_items[i]->setServiceItemId(m_items[i]->serviceItemId() + 1);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SlideModel::moveRowFromService(const int &fromIndex,
|
void SlideModel::moveRowFromService(const int &fromIndex,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue