(svn r48) Fix: Possible to disable some patches (e.g. default service interval) again by setting them to 0
authordominik
Fri, 13 Aug 2004 22:33:48 +0000
changeset 47 8368e4d4ef07
parent 46 c9bdf1d58df6
child 48 20d80c99ef02
(svn r48) Fix: Possible to disable some patches (e.g. default service interval) again by setting them to 0
settings_gui.c
--- a/settings_gui.c	Fri Aug 13 21:48:04 2004 +0000
+++ b/settings_gui.c	Fri Aug 13 22:33:48 2004 +0000
@@ -816,6 +816,8 @@
 
 	case PE_UINT16: if ((uint16)val > (uint16)pe->max) 
 									*(uint16*)pe->variable = (uint16)pe->max;
+								else if ( (pe->flags & PF_0ISDIS) && ((int16)val < (int16)pe->min) )
+									*(int16*)pe->variable = 0;
 								else if ((uint16)val < (uint16)pe->min)
 									*(uint16*)pe->variable = (uint16)pe->min;
 								else
@@ -940,10 +942,10 @@
 							val += pe->step;
 						if (val > pe->max) val = pe->max;
 					} else {
+						// decrease
 						if (val <= pe->min && pe->flags & PF_0ISDIS) {
 							val = 0;
 						} else {
-							// decrease
 							val -= pe->step;
 							if (val < pe->min) val = pe->min;
 						}