summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-03-09 18:24:11 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-03-09 18:24:11 (GMT)
commita5b750b1cd59c1c4aec853875151de4e821e2ba2 (patch)
tree48d4629d231ccabd11ad26005dc60a2968bc6cb5
parent866f54fd44d2d56233a0915c48912a9c9a6a498e (diff)
downloadblt-a5b750b1cd59c1c4aec853875151de4e821e2ba2.zip
blt-a5b750b1cd59c1c4aec853875151de4e821e2ba2.tar.gz
blt-a5b750b1cd59c1c4aec853875151de4e821e2ba2.tar.bz2
limit how small panner highlite box is displayed in cases where zoomed in
-rw-r--r--tksao/panner/panner.C4
1 files changed, 4 insertions, 0 deletions
diff --git a/tksao/panner/panner.C b/tksao/panner/panner.C
index 4e0251b..f009990 100644
--- a/tksao/panner/panner.C
+++ b/tksao/panner/panner.C
@@ -230,6 +230,10 @@ void Panner::updateCmd(void* p)
void Panner::updateBBoxCmd(const Vector& ll, const Vector& lr,
const Vector& ur, const Vector& ul)
{
+ Vector ss = ur - ll;
+ if (ss[0] < 3 || ss[1] < 3)
+ return;
+
bbox[0] = ll;
bbox[1] = lr;
bbox[2] = ur;