Fix for text items being selected on page load, and for non-editable

text items being editable on page load
preferencesAboutTextFull
Craig Watson 8 years ago
parent ee9965ac9e
commit c3e8e6397c
  1. 1
      src/adaptors/UBSvgSubsetAdaptor.cpp
  2. 4
      src/domain/UBGraphicsTextItem.cpp

@ -854,6 +854,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene(UBDocumentProx
{ {
textItem->setFlag(QGraphicsItem::ItemIsMovable, true); textItem->setFlag(QGraphicsItem::ItemIsMovable, true);
textItem->setFlag(QGraphicsItem::ItemIsSelectable, true); textItem->setFlag(QGraphicsItem::ItemIsSelectable, true);
textItem->activateTextEditor(false);
mScene->addItem(textItem); mScene->addItem(textItem);

@ -134,8 +134,10 @@ void UBGraphicsTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
} }
} }
if (!data(UBGraphicsItemData::ItemEditable).toBool()) if (!data(UBGraphicsItemData::ItemEditable).toBool()) {
setTextInteractionFlags(Qt::NoTextInteraction);
return; return;
}
setTextInteractionFlags(Qt::TextEditorInteraction); setTextInteractionFlags(Qt::TextEditorInteraction);

Loading…
Cancel
Save