Commit c970df75 authored by Wojciech Kosowicz's avatar Wojciech Kosowicz

Added keyboard shortcuts for copy/paste/cut/delete in Kexi reports

Shortcuts were added so now it's possible to use standard shortcuts
like for example: ctrl+c for copying report element

BUG: 334967
FIXED-IN: 2.9.1
REVIEW: 119368
parent 3f8bdb49
......@@ -830,15 +830,12 @@ void KoReportDesigner::sectionContextMenuEvent(ReportScene * s, QGraphicsSceneCo
bool itemsSelected = selectionCount() > 0;
if (itemsSelected) {
QAction *a = KStandardAction::cut(this, SLOT(slotEditCut()), &pop);
a->setShortcut(QKeySequence::UnknownKey); // shortcuts have no effect in the popup menu
pop.addAction(a);
a = KStandardAction::copy(this, SLOT(slotEditCopy()), &pop);
a->setShortcut(QKeySequence::UnknownKey); // shortcuts have no effect in the popup menu
pop.addAction(a);
}
if (!m_sectionData->copy_list.isEmpty()) {
QAction *a = KStandardAction::paste(this, SLOT(slotEditPaste()), &pop);
a->setShortcut(QKeySequence::UnknownKey); // shortcuts have no effect in the popup menu
pop.addAction(a);
}
......@@ -847,6 +844,7 @@ void KoReportDesigner::sectionContextMenuEvent(ReportScene * s, QGraphicsSceneCo
const KGuiItem del = KStandardGuiItem::del();
QAction *a = new KAction(del.icon(), del.text(), &pop);
a->setToolTip(del.toolTip());
a->setShortcut(QKeySequence(QKeySequence::Delete));
connect(a, SIGNAL(activated()), SLOT(slotEditDelete()));
pop.addAction(a);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment