mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 12:34:39 +03:00
PageItem cutting and deleting has been forbidden
This commit is contained in:
parent
de6ce6741f
commit
be63934c32
@ -1224,12 +1224,12 @@ void PageDesignIntf::paste()
|
||||
void PageDesignIntf::deleteSelected()
|
||||
{
|
||||
if (selectedItems().count()==1){
|
||||
if (!dynamic_cast<PageItemDesignIntf*>(selectedItems().at(0)))
|
||||
saveCommand(removeReportItemCommand(dynamic_cast<BaseDesignIntf*>(selectedItems().at(0))));
|
||||
} else {
|
||||
|
||||
QList<QGraphicsItem*> itemsToDelete = selectedItems();
|
||||
|
||||
|
||||
CommandGroup::Ptr commandGroup = CommandGroup::create();
|
||||
|
||||
QList<BandDesignIntf*> bands;
|
||||
@ -1797,6 +1797,7 @@ CommandIf::Ptr CutCommand::create(PageDesignIntf *page)
|
||||
command->setPage(page);
|
||||
ItemsWriterIntf *writer = new XMLWriter();
|
||||
foreach(QGraphicsItem * item, page->selectedItems()) {
|
||||
if (!dynamic_cast<PageItemDesignIntf*>(item)){
|
||||
BaseDesignIntf *reportItem = dynamic_cast<BaseDesignIntf *>(item);
|
||||
|
||||
if (reportItem) {
|
||||
@ -1804,6 +1805,7 @@ CommandIf::Ptr CutCommand::create(PageDesignIntf *page)
|
||||
writer->putItem(reportItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
command->setXML(writer->saveToString());
|
||||
|
||||
if (command->m_itemNames.count() > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user