adding incrementSeriviceItemId to insert of slides
This commit is contained in:
parent
4910a40fbe
commit
1b0f638df1
1 changed files with 6 additions and 1 deletions
|
@ -560,6 +560,12 @@ 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
|
||||||
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++) {
|
||||||
if (item.backgroundType() == "image") {
|
if (item.backgroundType() == "image") {
|
||||||
|
@ -590,7 +596,6 @@ void SlideModel::insertItemFromService(const int &index, const ServiceItem &item
|
||||||
"center", "center",
|
"center", "center",
|
||||||
index, 0, 1);
|
index, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SlideModel::moveRowFromService(const int &fromIndex,
|
void SlideModel::moveRowFromService(const int &fromIndex,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue