Skip to content

Commit

Permalink
Merge pull request seandepagnier#230 from did-g/routePosition_fix
Browse files Browse the repository at this point in the history
Route position fix
  • Loading branch information
seandepagnier authored Sep 28, 2018
2 parents b6af9b7 + fe54440 commit ae38842
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/WeatherRouting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ WeatherRouting::WeatherRouting(wxWindow *parent, weather_routing_pi &plugin)
m_PlotDialog(*this), m_FilterRoutesDialog(this),
m_bRunning(false), m_RoutesToRun(0), m_bSkipUpdateCurrentItems(false),
m_bShowConfiguration(false), m_bShowConfigurationBatch(false),
m_bShowSettings(false), m_bShowStatistics(false),
m_bShowReport(false), m_bShowPlot(false),
m_bShowRoutePosition(false), m_bShowSettings(false),
m_bShowStatistics(false), m_bShowReport(false), m_bShowPlot(false),
m_bShowFilter(false), m_weather_routing_pi(plugin),
m_positionOnRoute(NULL)
{
Expand Down Expand Up @@ -602,7 +602,8 @@ void WeatherRouting::UpdateRoutePositionDialog()
RoutePositionDialog &dlg = m_RoutePositionDialog;
if(!dlg.IsShown())
return;


m_positionOnRoute = NULL;
std::list<RouteMapOverlay*> currentroutemaps = CurrentRouteMaps();
if(currentroutemaps.size() != 1) {
RoutePositionDialogMessage(dlg, _("Select exactly 1 configuration"));
Expand Down Expand Up @@ -1259,6 +1260,7 @@ bool WeatherRouting::Show(bool show)
m_ReportDialog.Show(m_bShowReport);
m_PlotDialog.Show(m_bShowPlot);
m_FilterRoutesDialog.Show(m_bShowFilter);
m_RoutePositionDialog.Show(m_bShowRoutePosition);
} else {
m_bShowConfiguration = m_ConfigurationDialog.IsShown();
m_ConfigurationDialog.Hide();
Expand All @@ -1280,6 +1282,9 @@ bool WeatherRouting::Show(bool show)

m_bShowFilter = m_FilterRoutesDialog.IsShown();
m_FilterRoutesDialog.Hide();

m_bShowRoutePosition = m_RoutePositionDialog.IsShown();
m_RoutePositionDialog.Hide();
}

return WeatherRoutingBase::Show(show);
Expand Down Expand Up @@ -2337,7 +2342,7 @@ void WeatherRouting::Reset()
reinterpret_cast<WeatherRoute*>(wxUIntToPtr(m_panel->m_lWeatherRoutes->GetItemData(i)));
weatherroute->routemapoverlay->Reset();
}

m_positionOnRoute = NULL;
UpdateDialogs();

GetParent()->Refresh();
Expand Down
2 changes: 1 addition & 1 deletion src/WeatherRouting.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class WeatherRouting : public WeatherRoutingBase
int m_RoutesToRun;
bool m_bSkipUpdateCurrentItems;

bool m_bShowConfiguration, m_bShowConfigurationBatch;
bool m_bShowConfiguration, m_bShowConfigurationBatch, m_bShowRoutePosition;
bool m_bShowSettings, m_bShowStatistics, m_bShowReport, m_bShowPlot, m_bShowFilter;

weather_routing_pi &m_weather_routing_pi;
Expand Down

0 comments on commit ae38842

Please sign in to comment.