fix selection box coordinate bugs
authorDiane Trout <diane@caltech.edu>
Wed, 22 Mar 2006 23:56:16 +0000 (23:56 +0000)
committerDiane Trout <diane@caltech.edu>
Wed, 22 Mar 2006 23:56:16 +0000 (23:56 +0000)
ticket:41 and ticket:43 were both due to the fact that the right screen
coordinates weren't being properly offset by the current ortho.

alg/glseqbrowser.cpp

index fa5d6ccc5c95f86248650030a69ab2dded52449c..155750fdafe9b5d5ff22ea31b4745f4c9b6f0d47 100644 (file)
@@ -133,7 +133,7 @@ void GlSeqBrowser::selectRegion(int top, int left, int bottom, int right)
   GLfloat x_scale = cur_ortho.width()/((float)viewport_size.x);
   GLfloat y_scale = cur_ortho.height()/((float)viewport_size.y);
   GLfloat x_left = cur_ortho.left + (left*x_scale);
-  GLfloat x_right = right * x_scale;
+  GLfloat x_right = cur_ortho.left + (right * x_scale);
 
   if (top > bottom) {
     // woah, someone gave us a rectangle with the origin in the lower left