Prechádzať zdrojové kódy

remove redundant Invalidates from RecacheProperties, at certain places move them to PropertyChanged

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6791 8c9fc860-2736-0410-a75d-ab315db34111
eth.hunzikerp 9 rokov pred
rodič
commit
4f07b93c45
2 zmenil súbory, kde vykonal 5 pridanie a 3 odobranie
  1. 3 1
      source/WMMenus.Mod
  2. 2 2
      source/WMTabComponents.Mod

+ 3 - 1
source/WMMenus.Mod

@@ -116,6 +116,8 @@ TYPE
 			ELSIF (property = openDirection) THEN
 				openDirectionI := openDirection.Get();
 				Invalidate;
+			ELSIF property=properties THEN
+				RecacheProperties; Invalidate
 			ELSE
 				PropertyChanged^(sender, property);
 			END;
@@ -126,7 +128,7 @@ TYPE
 			RecacheProperties^;
 			horizontalI := horizontal.Get();
 			openDirectionI := openDirection.Get();
-			Invalidate;
+			(*Invalidate;*)
 		END RecacheProperties;
 
 		PROCEDURE SetParent(parentMenuPanel : MenuPanel);

+ 2 - 2
source/WMTabComponents.Mod

@@ -126,7 +126,7 @@ TYPE
 				(property = bgLeftSelected) OR (property = bgMiddleSelected) OR (property = bgRightSelected) OR
 				(property = bgLeftAttention) OR (property = bgMiddleAttention) OR (property = bgRightAttention)
 			THEN
-				RecacheProperties;
+				RecacheProperties; Invalidate;
 			ELSIF (property = borderWidth) OR
 				(property = clDefault) OR (property = clHover) OR (property = clSelected) OR (property = clAttention) OR
 				(property = clSelectedAttention) OR (property = clTextDefault) OR (property = clTextHover) OR
@@ -166,7 +166,7 @@ TYPE
 				imgLeftSelected := NIL; imgMiddleSelected := NIL; imgRightSelected := NIL;
 				imgLeftAttention := NIL; imgMiddleAttention := NIL; imgRightAttention := NIL;
 			END;
-			Invalidate
+			(*Invalidate*)
 		END RecacheProperties;
 
 		PROCEDURE FindTabFromPos(x,y: LONGINT) : Tab;