Browse Source

Made a utility function public to make WMComponentGrid simpler, fixed behavior when using the mouse wheel to scroll. Requires System rebuild due to signature change.

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7393 8c9fc860-2736-0410-a75d-ab315db34111
skoster 7 years ago
parent
commit
2e4ebc7fc0
1 changed files with 3 additions and 2 deletions
  1. 3 2
      source/WMGrids.Mod

+ 3 - 2
source/WMGrids.Mod

@@ -397,7 +397,7 @@ TYPE
 			scrolly.visible.Set((alwaysShowScrollYC OR (ymax > 1)) & showScrollYC)
 		END CheckScrollbarsNeeded;
 
-		PROCEDURE GetVisibleCellRect(col, row : LONGINT): WMRectangles.Rectangle;
+		PROCEDURE GetVisibleCellRect*(col, row : LONGINT): WMRectangles.Rectangle;
 		VAR x, y, i, tc, tr, tx, ty, w, h: LONGINT; rect : WMRectangles.Rectangle;
 		BEGIN
 			GetFixedPixels(tx, ty);
@@ -850,7 +850,8 @@ TYPE
 		PROCEDURE WheelMove*(dz: LONGINT); (** PROTECTED *)
 		VAR t, l : LONGINT;
 		BEGIN
-			GetTopPosition(l, t); t := t + dz; SetTopPosition(l, t, TRUE)
+			GetTopPosition(l, t); t := t + dz; SetTopPosition(l, t, TRUE);
+			AlignSubComponents();
 		END WheelMove;
 
 	END GenericGrid;