Commit 02f297be authored by Marco Bubke's avatar Marco Bubke Committed by Kai Koehne

Change GraphicsView settings to be more in line with Qml

Task-Number: BAUHAUS-567
Reviewed-by: kkoehne
parent 3351f942
...@@ -43,8 +43,9 @@ FormEditorGraphicsView::FormEditorGraphicsView(QWidget *parent) : ...@@ -43,8 +43,9 @@ FormEditorGraphicsView::FormEditorGraphicsView(QWidget *parent) :
setTransformationAnchor(QGraphicsView::AnchorUnderMouse); setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
setResizeAnchor(QGraphicsView::AnchorViewCenter); setResizeAnchor(QGraphicsView::AnchorViewCenter);
// setCacheMode(QGraphicsView::CacheNone); // setCacheMode(QGraphicsView::CacheNone);
setCacheMode(QGraphicsView::CacheBackground); setCacheMode(QGraphicsView::CacheBackground);
setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
setOptimizationFlags(QGraphicsView::DontSavePainterState);
// setViewportUpdateMode(QGraphicsView::NoViewportUpdate); // setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
setRenderHint(QPainter::Antialiasing, false); setRenderHint(QPainter::Antialiasing, false);
......
...@@ -67,6 +67,7 @@ FormEditorScene::FormEditorScene(FormEditorWidget *view, FormEditorView *editorV ...@@ -67,6 +67,7 @@ FormEditorScene::FormEditorScene(FormEditorWidget *view, FormEditorView *editorV
m_formLayerItem->setZValue(0.0); m_formLayerItem->setZValue(0.0);
m_formLayerItem->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); m_formLayerItem->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
view->setScene(this); view->setScene(this);
setItemIndexMethod(QGraphicsScene::NoIndex);
// setItemIndexMethod(QGraphicsScene::NoIndex); // setItemIndexMethod(QGraphicsScene::NoIndex);
} }
......
...@@ -95,8 +95,10 @@ NodeInstanceView::NodeInstanceView(QObject *parent) ...@@ -95,8 +95,10 @@ NodeInstanceView::NodeInstanceView(QObject *parent)
m_blockStatePropertyChanges(false) m_blockStatePropertyChanges(false)
{ {
m_graphicsView->setAttribute(Qt::WA_DontShowOnScreen, true); m_graphicsView->setAttribute(Qt::WA_DontShowOnScreen, true);
m_graphicsView->setViewportUpdateMode(QGraphicsView::NoViewportUpdate); m_graphicsView->setOptimizationFlags(QGraphicsView::DontSavePainterState);
m_graphicsView->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
m_graphicsView->setScene(new QGraphicsScene(m_graphicsView.data())); m_graphicsView->setScene(new QGraphicsScene(m_graphicsView.data()));
m_graphicsView->scene()->setItemIndexMethod(QGraphicsScene::NoIndex);
} }
......
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