From 3a302733772bcb1e7f6ce830db19754efbb3ca45 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Tue, 21 Aug 2018 19:37:20 +0300 Subject: [PATCH] Copy & Cut abilities have been removed from band --- common.pri | 2 +- limereport/lrbanddesignintf.cpp | 11 ++++++++--- limereport/lrpagedesignintf.cpp | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/common.pri b/common.pri index 86adc01..ef17042 100644 --- a/common.pri +++ b/common.pri @@ -75,7 +75,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 99 +LIMEREPORT_VERSION_RELEASE = 100 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp index e767f26..1508b8e 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -502,10 +502,15 @@ void BandDesignIntf::moveItemsDown(qreal startPos, qreal offset){ void BandDesignIntf::preparePopUpMenu(QMenu &menu) { + + QList disabledActions; + disabledActions << tr("Bring to top") << + tr("Send to back") << + tr("Cut") << + tr("Copy"); + foreach (QAction* action, menu.actions()) { - if (action->text().compare(tr("Bring to top")) == 0 || - action->text().compare(tr("Send to back")) == 0 ) - action->setEnabled(false); + action->setEnabled(!disabledActions.contains(action->text())); } menu.addSeparator(); diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index 8fc4cc7..9f7705b 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -1859,7 +1859,7 @@ CommandIf::Ptr CutCommand::create(PageDesignIntf *page) ItemsWriterIntf *writer = new XMLWriter(); foreach(QGraphicsItem * item, page->selectedItems()) { if (!dynamic_cast(item)){ - BaseDesignIntf *reportItem = dynamic_cast(item); + ItemDesignIntf *reportItem = dynamic_cast(item); if (reportItem) { command->m_itemNames.push_back(reportItem->objectName());