mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 16:44:39 +03:00
Paste command does not change the name of the item if it does not exist
This commit is contained in:
parent
45610e7e19
commit
2cc1cc0d13
@ -1803,11 +1803,14 @@ bool PasteCommand::insertItem(ItemsReaderIntf::Ptr reader)
|
|||||||
if (parentItem){
|
if (parentItem){
|
||||||
BaseDesignIntf *item = page()->addReportItem(reader->itemClassName(), parentItem, parentItem);
|
BaseDesignIntf *item = page()->addReportItem(reader->itemClassName(), parentItem, parentItem);
|
||||||
if (item) {
|
if (item) {
|
||||||
m_itemNames.push_back(item->objectName());
|
QString objectName = item->objectName();
|
||||||
reader->readItem(item);
|
reader->readItem(item);
|
||||||
item->setParent(parentItem);
|
item->setParent(parentItem);
|
||||||
item->setParentItem(parentItem);
|
item->setParentItem(parentItem);
|
||||||
item->setObjectName(m_itemNames.last());
|
if (page()->reportItemsByName(item->objectName()).size()>1){
|
||||||
|
item->setObjectName(objectName);
|
||||||
|
}
|
||||||
|
m_itemNames.push_back(item->objectName());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user