Commit 31504292 authored by Jarosław Staniek's avatar Jarosław Staniek

Kexi reports: Cut action should make the report design dirty.

(also: don't emit "dirty" for every item)
parent 32dca1f8
......@@ -955,14 +955,15 @@ void KoReportDesigner::slotItem(const QString &entity)
void KoReportDesigner::slotEditDelete()
{
QGraphicsItem * item = 0;
bool modified = false;
while (selectionCount() > 0) {
item = activeScene()->selectedItems()[0];
if (item) {
setModified(true);
QGraphicsScene * scene = item->scene();
delete item;
scene->update();
m_sectionData->mouseAction = ReportWriterSectionData::MA_None;
modified = true;
}
}
activeScene()->selectedItems().clear();
......@@ -975,6 +976,9 @@ void KoReportDesigner::slotEditDelete()
//and remove it.
m_sectionData->cut_list.clear();
m_sectionData->copy_list.clear();
if (modified) {
setModified(true);
}
}
void KoReportDesigner::slotEditCut()
......@@ -986,6 +990,7 @@ void KoReportDesigner::slotEditCut()
m_sectionData->cut_list.clear();
QGraphicsItem * item = activeScene()->selectedItems().first();
bool modified = false;
if (item) {
m_sectionData->copy_list.clear();
......@@ -999,10 +1004,14 @@ void KoReportDesigner::slotEditCut()
QGraphicsItem *itm = activeScene()->selectedItems()[0];
activeScene()->removeItem(itm);
activeScene()->update();
modified = true;
}
m_sectionData->selected_x_offset = 10;
m_sectionData->selected_y_offset = 10;
}
if (modified) {
setModified(true);
}
}
}
......
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