summaryrefslogtreecommitdiffstats
path: root/src/removeoverlap/block.cpp
diff options
context:
space:
mode:
authorTim Dwyer <tgdwyer@gmail.com>2006-01-26 05:32:20 +0000
committertgdwyer <tgdwyer@users.sourceforge.net>2006-01-26 05:32:20 +0000
commitbd5d4e5d36392293eeb966cfdf4b68cca2099a9f (patch)
tree844ef674a2ce640ced96538258264f1e5003535c /src/removeoverlap/block.cpp
parentfix silly bug - was unable to flip by scaling (diff)
downloadinkscape-bd5d4e5d36392293eeb966cfdf4b68cca2099a9f.tar.gz
inkscape-bd5d4e5d36392293eeb966cfdf4b68cca2099a9f.zip
Fixed bug to do with comparison of invalid constraints in pairing heaps.
Also numerical problem with constraint generation fixed. (bzr r30)
Diffstat (limited to 'src/removeoverlap/block.cpp')
-rw-r--r--src/removeoverlap/block.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/removeoverlap/block.cpp b/src/removeoverlap/block.cpp
index 32b310153..ebf56ea9e 100644
--- a/src/removeoverlap/block.cpp
+++ b/src/removeoverlap/block.cpp
@@ -8,13 +8,13 @@
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
-
-
+#include <cassert>
#include "constraint.h"
#include "block.h"
#include "blocks.h"
#include "pairingheap/PairingHeap.h"
#ifdef RECTANGLE_OVERLAP_LOGGING
+#include <fstream>
using std::ios;
using std::ofstream;
using std::endl;
@@ -125,6 +125,13 @@ Constraint *Block::findMinInConstraint() {
#endif
if(lb == rb) {
// constraint has been merged into the same block
+#ifdef RECTANGLE_OVERLAP_LOGGING
+ if(v->slack()<0) {
+ f<<" violated internal constraint found! "<<*v<<endl;
+ f<<" lb="<<*lb<<endl;
+ f<<" rb="<<*rb<<endl;
+ }
+#endif
in->deleteMin();
#ifdef RECTANGLE_OVERLAP_LOGGING
f<<" ... skipping internal constraint"<<endl;