Commit 07a270bf authored by Ilia Ryabokon's avatar Ilia Ryabokon

Optimization flags

parent 4bc6f3cc
...@@ -146,7 +146,8 @@ void UBBoardView::init () ...@@ -146,7 +146,8 @@ void UBBoardView::init ()
setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOff); setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOff);
setAcceptDrops (true); setAcceptDrops (true);
setOptimizationFlag (QGraphicsView::IndirectPainting); // enable UBBoardView::drawItems filter setOptimizationFlags (QGraphicsView::IndirectPainting | QGraphicsView::DontSavePainterState); // enable UBBoardView::drawItems filter
setViewportUpdateMode(QGraphicsView::SmartViewportUpdate);
mTabletStylusIsPressed = false; mTabletStylusIsPressed = false;
mMouseButtonIsPressed = false; mMouseButtonIsPressed = false;
......
...@@ -201,7 +201,7 @@ QVariant UBGraphicsStrokesGroup::itemChange(GraphicsItemChange change, const QVa ...@@ -201,7 +201,7 @@ QVariant UBGraphicsStrokesGroup::itemChange(GraphicsItemChange change, const QVa
return QGraphicsItemGroup::itemChange(change, newValue); return QGraphicsItemGroup::itemChange(change, newValue);
} }
QPainterPath UBGraphicsStrokesGroup::shape () const QPainterPath UBGraphicsStrokesGroup::shape() const
{ {
QPainterPath path; QPainterPath path;
......
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