fixed keyboard input for things filters when the list is dropped down

This commit is contained in:
codeimp 2009-01-16 10:20:19 +00:00
parent 3666e733b2
commit 9c0bd91ce6

View file

@ -1133,12 +1133,16 @@ namespace CodeImp.DoomBuilder.Windows
if(shift) mod |= (int)Keys.Shift; if(shift) mod |= (int)Keys.Shift;
if(ctrl) mod |= (int)Keys.Control; if(ctrl) mod |= (int)Keys.Control;
// Invoke any actions associated with this key // Don't process any keys when they are meant for the things filter drop down box
General.Actions.UpdateModifiers(mod); if(!thingfilters.DroppedDown)
General.Actions.KeyPressed((int)e.KeyData); {
// Invoke any actions associated with this key
General.Actions.UpdateModifiers(mod);
General.Actions.KeyPressed((int)e.KeyData);
// Invoke on editing mode // Invoke on editing mode
if((General.Map != null) && (General.Editing.Mode != null)) General.Editing.Mode.OnKeyDown(e); if((General.Map != null) && (General.Editing.Mode != null)) General.Editing.Mode.OnKeyDown(e);
}
} }
// When a key is released // When a key is released
@ -1154,12 +1158,16 @@ namespace CodeImp.DoomBuilder.Windows
if(shift) mod |= (int)Keys.Shift; if(shift) mod |= (int)Keys.Shift;
if(ctrl) mod |= (int)Keys.Control; if(ctrl) mod |= (int)Keys.Control;
// Invoke any actions associated with this key // Don't process any keys when they are meant for the things filter drop down box
General.Actions.UpdateModifiers(mod); if(!thingfilters.DroppedDown)
General.Actions.KeyReleased((int)e.KeyData); {
// Invoke any actions associated with this key
General.Actions.UpdateModifiers(mod);
General.Actions.KeyReleased((int)e.KeyData);
// Invoke on editing mode // Invoke on editing mode
if((General.Map != null) && (General.Editing.Mode != null)) General.Editing.Mode.OnKeyUp(e); if((General.Map != null) && (General.Editing.Mode != null)) General.Editing.Mode.OnKeyUp(e);
}
} }
#endregion #endregion
@ -1239,7 +1247,7 @@ namespace CodeImp.DoomBuilder.Windows
} }
// Lose focus // Lose focus
LoseFocus(sender, e); if(!thingfilters.DroppedDown) LoseFocus(sender, e);
} }
// This updates the things filter on the toolbar // This updates the things filter on the toolbar