0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-01-12 09:31:04 +03:00

Fix crash when cutting an item using the context menu

page->cut() is deleting the object, which means that "this" is no longer valid, and then we're trying to call `processPopUpAction()` on it.
This commit is contained in:
Andy Maloney 2017-04-09 11:40:56 -04:00
parent 010db431b1
commit 8ee7fc01e5

View File

@ -1180,7 +1180,10 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
QAction* a = menu.exec(event->screenPos()); QAction* a = menu.exec(event->screenPos());
if (a){ if (a){
if (a == cutAction) if (a == cutAction)
{
page->cut(); page->cut();
return;
}
if (a == copyAction) if (a == copyAction)
page->copy(); page->copy();
if (a == pasteAction) if (a == pasteAction)