mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-25 13:04:38 +03:00
Disable the context menu for non-editable items
This commit is contained in:
commit
5d7a116f31
@ -1153,6 +1153,7 @@ void BaseDesignIntf::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
|
|
||||||
void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||||
{
|
{
|
||||||
|
if (!(flags() & QGraphicsItem::ItemIsSelectable)) return;
|
||||||
PageDesignIntf* page = dynamic_cast<PageDesignIntf*>(scene());
|
PageDesignIntf* page = dynamic_cast<PageDesignIntf*>(scene());
|
||||||
if (!page->selectedItems().contains(this)){
|
if (!page->selectedItems().contains(this)){
|
||||||
page->clearSelection();
|
page->clearSelection();
|
||||||
|
Loading…
Reference in New Issue
Block a user