summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2013-09-25 15:52:11 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2013-09-25 15:52:11 +0100
commit17ad0a0b61a887362ce07b1f8b59de003ddd9233 (patch)
tree725973d055c7ae68f46e426065bd14e7332e6f0b
parent19bb2b33a89a1291451f0740739a36daebe00bae (diff)
parent18850253e9f0034fad132e0da07a2651ce041450 (diff)
Merge branch 'cairocanvas' into windows+cc
-rw-r--r--libs/canvas/canvas.cc6
-rw-r--r--libs/canvas/canvas/debug.h2
-rw-r--r--libs/canvas/group.cc2
-rw-r--r--libs/canvas/lookup_table.cc2
4 files changed, 8 insertions, 4 deletions
diff --git a/libs/canvas/canvas.cc b/libs/canvas/canvas.cc
index b62393b334..908af16065 100644
--- a/libs/canvas/canvas.cc
+++ b/libs/canvas/canvas.cc
@@ -342,17 +342,19 @@ GtkCanvas::enter_leave_items (Duple const & point, int state)
*/
cerr << "E/L: " << items.size() << " to check at " << point << endl;
+#ifdef CANVAS_DEBUG
for (vector<Item const*>::const_reverse_iterator i = items.rbegin(); i != items.rend(); ++i) {
cerr << '\t' << (*i)->whatami() << ' ' << (*i)->name << " ignore ? " << (*i)->ignore_events() << " current ? " << (_current_item == (*i)) << endl;
}
+#endif
cerr << "------------\n";
for (vector<Item const*>::const_reverse_iterator i = items.rbegin(); i != items.rend(); ++i) {
Item const * new_item = *i;
-
+#ifdef CANVAS_DEBUG
cerr << "\tE/L check out " << new_item->whatami() << ' ' << new_item->name << " ignore ? " << new_item->ignore_events() << " current ? " << (_current_item == new_item) << endl;
-
+#endif
if (new_item->ignore_events()) {
cerr << "continue1\n";
continue;
diff --git a/libs/canvas/canvas/debug.h b/libs/canvas/canvas/debug.h
index e6636e9cb3..a025e605dc 100644
--- a/libs/canvas/canvas/debug.h
+++ b/libs/canvas/canvas/debug.h
@@ -36,7 +36,7 @@ namespace PBD {
#ifdef CANVAS_DEBUG
#define CANVAS_DEBUG_NAME(i, n) i->name = n;
#else
-#define CANVAS_DEBUG(i, n) /* empty */
+#define CANVAS_DEBUG_NAME(i, n) /* empty */
#endif
namespace ArdourCanvas {
diff --git a/libs/canvas/group.cc b/libs/canvas/group.cc
index 9a846dfcf2..63754ae72f 100644
--- a/libs/canvas/group.cc
+++ b/libs/canvas/group.cc
@@ -295,6 +295,7 @@ Group::add_items_at_point (Duple const point, vector<Item const *>& items) const
void
Group::dump (ostream& o) const
{
+#ifdef CANVAS_DEBUG
o << _canvas->indent();
o << "Group " << this << " [" << name << ']';
o << " @ " << position();
@@ -311,6 +312,7 @@ Group::dump (ostream& o) const
}
o << endl;
+#endif
ArdourCanvas::dump_depth++;
diff --git a/libs/canvas/lookup_table.cc b/libs/canvas/lookup_table.cc
index be0e553ee7..9697ba8103 100644
--- a/libs/canvas/lookup_table.cc
+++ b/libs/canvas/lookup_table.cc
@@ -79,7 +79,7 @@ OptimizingLookupTable::OptimizingLookupTable (Group const & group, int items_per
/* number of cells */
int const cells = items.size() / _items_per_cell;
/* hence number down each side of the table's square */
- _dimension = max (1, int (rint (sqrt (cells))));
+ _dimension = max (1, int (rint (sqrt ((double)cells))));
_cells = new Cell*[_dimension];
for (int i = 0; i < _dimension; ++i) {