Commit 6d82d878 authored by Florent D'Halluin's avatar Florent D'Halluin Committed by Guillaume Lazzara
Browse files

Update viewer.

* viewer/image_region.cc,
* viewer/image_region.hxx:
Fix graphic bug when moving the view while an object is selected.
parent 999e60c6
......@@ -104,6 +104,7 @@ ImageRegion::select()
{
selected_ = true;
setZValue(2);
prepareGeometryChange();
scene()->invalidate();
update();
}
......@@ -115,8 +116,9 @@ ImageRegion::deselect()
if (selected_)
{
selected_ = false;
scene()->invalidate();
setZValue(1);
prepareGeometryChange();
scene()->invalidate();
update();
}
}
......@@ -70,6 +70,8 @@ inline
QRectF
ImageRegion::boundingRect() const
{
if (selected_)
return mapFromScene(scene()->sceneRect()).boundingRect();
return rect_;
}
......
Supports Markdown
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