Flags Form: added special handling for flag with zero value.

This commit is contained in:
MaxED 2014-09-15 09:35:11 +00:00
parent 7b735dc898
commit 2056febb82

View file

@ -76,8 +76,8 @@ namespace CodeImp.DoomBuilder.Windows
// Not the same box? // Not the same box?
if(b != sender) if(b != sender)
{ {
// Overlapping bit flags? // Overlapping bit flags? mxd: box with flag 0 requires special handling...
if(((int)b.Tag & (int)thisbox.Tag) != 0) if( (int)b.Tag == 0 || (int)thisbox.Tag == 0 || (((int)b.Tag & (int)thisbox.Tag) != 0) )
{ {
// Uncheck the other // Uncheck the other
b.Checked = false; b.Checked = false;
@ -143,8 +143,8 @@ namespace CodeImp.DoomBuilder.Windows
// Not the same box? // Not the same box?
if(b != box) if(b != box)
{ {
// Overlapping bit flags? // Overlapping bit flags? mxd: box with flag 0 requires special handling...
if(((int)b.Tag & (int)box.Tag) != 0) if( ((int)b.Tag == 0 && value != 0) || ((int)b.Tag & (int)box.Tag) != 0 )
{ {
// Uncheck the other // Uncheck the other
b.Checked = false; b.Checked = false;