summaryrefslogtreecommitdiff
path: root/libs/canvas/poly_item.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-03-11 07:36:09 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-03-11 07:36:09 -0400
commitc2946ee00f6b5ec8205dd2fcb5b6d2ace2907436 (patch)
treea9d088f0e42209e0bab50686a54ac12290fbe776 /libs/canvas/poly_item.cc
parent495c0de4ac2e5292a2ebaf276e57cb30fea414db (diff)
don't queue redraws when various canvas item properties are "reset" to the same value, plus supporting functions
Diffstat (limited to 'libs/canvas/poly_item.cc')
-rw-r--r--libs/canvas/poly_item.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/libs/canvas/poly_item.cc b/libs/canvas/poly_item.cc
index 88b9af7878..0d3369f70b 100644
--- a/libs/canvas/poly_item.cc
+++ b/libs/canvas/poly_item.cc
@@ -127,12 +127,15 @@ PolyItem::render_curve (Rect const & area, Cairo::RefPtr<Cairo::Context> context
void
PolyItem::set (Points const & points)
{
- begin_change ();
-
- _points = points;
-
- _bounding_box_dirty = true;
- end_change ();
+ if (_points != points) {
+
+ begin_change ();
+
+ _points = points;
+
+ _bounding_box_dirty = true;
+ end_change ();
+ }
}
Points const &