Skip to content

Commit

Permalink
FlightData: add GimbalVideoControl to map
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong13 committed Oct 21, 2024
1 parent 6adf829 commit ff252c2
Show file tree
Hide file tree
Showing 5 changed files with 600 additions and 320 deletions.
7 changes: 3 additions & 4 deletions Controls/GimbalVideoControl.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Controls/GimbalVideoControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ private void videoStreamToolStripMenuItem_Click(object sender, EventArgs e)
public bool PreFilterMessage(ref Message m)
{
// Don't hog the keyboard when this control doesn't have focus
if (!ContainsFocus)
if (!(Parent?.ContainsFocus ?? false))
{
if(heldKeys.Count > 0)
{
Expand Down Expand Up @@ -546,6 +546,9 @@ private void VideoBox_MouseLeave(object sender, EventArgs e)

private void VideoBox_Click(object sender, EventArgs e)
{
// Focus the control when clicked
VideoBox.Focus();

MouseEventArgs me = (MouseEventArgs)e;
var point = getMousePosition(me.X, me.Y);
if (!point.HasValue)
Expand Down
Loading

0 comments on commit ff252c2

Please sign in to comment.