[GME-commit] GMESRC/GME/Gme ScrollZoomView.cpp,1.5,1.6
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Thu Mar 11 15:17:26 CST 2004
Update of /var/lib/gme/GMESRC/GME/Gme
In directory braindrain:/tmp/cvs-serv9310
Modified Files:
ScrollZoomView.cpp
Log Message:
zoom problem solved and enhanced
CVS User: bogyom
Index: ScrollZoomView.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/ScrollZoomView.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ScrollZoomView.cpp 11 Mar 2004 18:04:27 -0000 1.5
--- ScrollZoomView.cpp 11 Mar 2004 21:17:23 -0000 1.6
***************
*** 369,372 ****
--- 369,376 ----
ASSERT(ptDev.x >= 0);
ASSERT(ptDev.y >= 0);
+ int maxh = GetScrollLimit(SB_HORZ);
+ int maxv = GetScrollLimit(SB_VERT);
+ if (maxh == 0 && maxv == 0)
+ return;
// Note: ScrollToDevicePosition can and is used to scroll out-of-range
***************
*** 379,384 ****
int yOrig = GetScrollPos(SB_VERT);
SetScrollPos(SB_VERT, ptDev.y);
- int maxh = GetScrollLimit(SB_HORZ);
- int maxv = GetScrollLimit(SB_VERT);
ptDev.x = min(maxh, ptDev.x);
ptDev.y = min(maxv, ptDev.y);
--- 383,386 ----
***************
*** 665,668 ****
--- 667,672 ----
// if entire client area is not invisible, assume we have
// control over our scrollbars
+ SetScrollPos(SB_HORZ, 0);
+ SetScrollPos(SB_VERT, 0);
EnableScrollBarCtrl(SB_BOTH, FALSE);
SetScrollRange(SB_HORZ, 0, 0, TRUE);
***************
*** 715,718 ****
--- 719,723 ----
else
{
+ SetScrollPos(SB_HORZ, 0);
SetScrollRange(SB_HORZ, 0, 0, TRUE);
}
***************
*** 727,730 ****
--- 732,736 ----
else
{
+ SetScrollPos(SB_VERT, 0);
SetScrollRange(SB_VERT, 0, 0, TRUE);
}
More information about the GME-commit
mailing list