0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-04-04 16:33:46 +03:00

fixed objectName children changes when copying items

This commit is contained in:
yanis60 2023-01-22 18:42:25 +01:00
parent 36d8878f6e
commit 98ac5ce37f

View File

@ -2148,7 +2148,9 @@ bool PasteCommand::insertItem(ItemsReaderIntf::Ptr reader)
if (page()->reportItemsByName(item->objectName()).size()>1){ if (page()->reportItemsByName(item->objectName()).size()>1){
item->setObjectName(objectName); item->setObjectName(objectName);
} }
foreach (BaseDesignIntf* child, item->childBaseItems()){ foreach (BaseDesignIntf* child, item->childBaseItems()){
if (page()->reportItemsByName(child->objectName()).size() == 0)
changeName(page(), child); changeName(page(), child);
}; };
m_itemNames.push_back(item->objectName()); m_itemNames.push_back(item->objectName());