Skip to content

Commit

Permalink
MainV2: add reload check on fw upload
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Feb 11, 2016
1 parent dd5638d commit e6e79c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GCSViews/InitialSetup.Designer.cs

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

2 changes: 1 addition & 1 deletion GCSViews/InitialSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace MissionPlanner.GCSViews
{
public partial class InitialSetup : MyUserControl, IActivate
{
internal static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
internal static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static string lastpagename = "";

public InitialSetup()
Expand Down
5 changes: 5 additions & 0 deletions MainV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,11 @@ public MainV2()

void comPort_MavChanged(object sender, EventArgs e)
{
// when uploading a firmware we dont want to reload this screen.
if (instance.MyView.current.Control.GetType() == typeof(GCSViews.InitialSetup)
&& ((GCSViews.InitialSetup)instance.MyView.current.Control).backstageView.SelectedPage.Text == "Install Firmware")
return;

if (this.InvokeRequired)
{
this.Invoke((MethodInvoker) delegate
Expand Down

0 comments on commit e6e79c0

Please sign in to comment.