From 2056febb829f3e11364e0c245e014a3bcc7ce197 Mon Sep 17 00:00:00 2001 From: MaxED Date: Mon, 15 Sep 2014 09:35:11 +0000 Subject: [PATCH] Flags Form: added special handling for flag with zero value. --- Source/Core/Windows/BitFlagsForm.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Windows/BitFlagsForm.cs b/Source/Core/Windows/BitFlagsForm.cs index bacdf288..baad5f1e 100644 --- a/Source/Core/Windows/BitFlagsForm.cs +++ b/Source/Core/Windows/BitFlagsForm.cs @@ -76,8 +76,8 @@ namespace CodeImp.DoomBuilder.Windows // Not the same box? if(b != sender) { - // Overlapping bit flags? - if(((int)b.Tag & (int)thisbox.Tag) != 0) + // Overlapping bit flags? mxd: box with flag 0 requires special handling... + if( (int)b.Tag == 0 || (int)thisbox.Tag == 0 || (((int)b.Tag & (int)thisbox.Tag) != 0) ) { // Uncheck the other b.Checked = false; @@ -143,8 +143,8 @@ namespace CodeImp.DoomBuilder.Windows // Not the same box? if(b != box) { - // Overlapping bit flags? - if(((int)b.Tag & (int)box.Tag) != 0) + // Overlapping bit flags? mxd: box with flag 0 requires special handling... + if( ((int)b.Tag == 0 && value != 0) || ((int)b.Tag & (int)box.Tag) != 0 ) { // Uncheck the other b.Checked = false;