Skip to content

Commit

Permalink
autosize all columns
Browse files Browse the repository at this point in the history
  • Loading branch information
seandepagnier committed Feb 15, 2018
1 parent e1a55e5 commit 56ad821
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 16 deletions.
4 changes: 2 additions & 2 deletions VERSION.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SET(PLUGIN_VERSION_MAJOR "1")
SET(PLUGIN_VERSION_MINOR "11")
SET(PLUGIN_VERSION_PATCH "0")
SET(PLUGIN_VERSION_DATE "2017-12-17")
SET(PLUGIN_VERSION_PATCH "1")
SET(PLUGIN_VERSION_DATE "2018-02-15")
56 changes: 42 additions & 14 deletions src/WeatherRouting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1644,47 +1644,75 @@ void WeatherRouting::UpdateItem(long index, bool stateonly)
m_lWeatherRoutes->SetColumnWidth(columns[TIME], wxLIST_AUTOSIZE);
}

if(columns[DISTANCE] >= 0)
if(columns[DISTANCE] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[DISTANCE], weatherroute->Distance);
m_lWeatherRoutes->SetColumnWidth(columns[DISTANCE], wxLIST_AUTOSIZE);
}

if(columns[AVGSPEED] >= 0)
if(columns[AVGSPEED] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[AVGSPEED], weatherroute->AvgSpeed);
m_lWeatherRoutes->SetColumnWidth(columns[AVGSPEED], wxLIST_AUTOSIZE);
}

if(columns[MAXSPEED] >= 0)
if(columns[MAXSPEED] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[MAXSPEED], weatherroute->MaxSpeed);
m_lWeatherRoutes->SetColumnWidth(columns[MAXSPEED], wxLIST_AUTOSIZE);
}

if(columns[AVGSPEEDGROUND] >= 0)
if(columns[AVGSPEEDGROUND] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[AVGSPEEDGROUND], weatherroute->AvgSpeedGround);
m_lWeatherRoutes->SetColumnWidth(columns[AVGSPEEDGROUND], wxLIST_AUTOSIZE);
}

if(columns[MAXSPEEDGROUND] >= 0)
if(columns[MAXSPEEDGROUND] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[MAXSPEEDGROUND], weatherroute->MaxSpeedGround);
m_lWeatherRoutes->SetColumnWidth(columns[MAXSPEEDGROUND], wxLIST_AUTOSIZE);
}

if(columns[AVGWIND] >= 0)
if(columns[AVGWIND] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[AVGWIND], weatherroute->AvgWind);
m_lWeatherRoutes->SetColumnWidth(columns[AVGWIND], wxLIST_AUTOSIZE);
}

if(columns[MAXWIND] >= 0)
if(columns[MAXWIND] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[MAXWIND], weatherroute->MaxWind);
m_lWeatherRoutes->SetColumnWidth(columns[MAXWIND], wxLIST_AUTOSIZE);
}

if(columns[MAXWINDGUST] >= 0)
if(columns[MAXWINDGUST] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[MAXWINDGUST], weatherroute->MaxWindGust);
m_lWeatherRoutes->SetColumnWidth(columns[MAXWINDGUST], wxLIST_AUTOSIZE);
}

if(columns[AVGCURRENT] >= 0)
if(columns[AVGCURRENT] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[AVGCURRENT], weatherroute->AvgCurrent);
m_lWeatherRoutes->SetColumnWidth(columns[AVGCURRENT], wxLIST_AUTOSIZE);
}

if(columns[MAXCURRENT] >= 0)
if(columns[MAXCURRENT] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[MAXCURRENT], weatherroute->MaxCurrent);
m_lWeatherRoutes->SetColumnWidth(columns[MAXCURRENT], wxLIST_AUTOSIZE);
}

if(columns[AVGSWELL] >= 0)
if(columns[AVGSWELL] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[AVGSWELL], weatherroute->AvgSwell);
m_lWeatherRoutes->SetColumnWidth(columns[AVGSWELL], wxLIST_AUTOSIZE);
}

if(columns[MAXSWELL] >= 0)
if(columns[MAXSWELL] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[MAXSWELL], weatherroute->MaxSwell);
m_lWeatherRoutes->SetColumnWidth(columns[MAXSWELL], wxLIST_AUTOSIZE);
}

if(columns[UPWIND_PERCENTAGE] >= 0)
if(columns[UPWIND_PERCENTAGE] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[UPWIND_PERCENTAGE], weatherroute->UpwindPercentage);
m_lWeatherRoutes->SetColumnWidth(columns[UPWIND_PERCENTAGE], wxLIST_AUTOSIZE);
}

if(columns[PORT_STARBOARD] >= 0)
if(columns[PORT_STARBOARD] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[PORT_STARBOARD], weatherroute->PortStarboard);
m_lWeatherRoutes->SetColumnWidth(columns[PORT_STARBOARD], wxLIST_AUTOSIZE);
}

if(columns[TACKS] >= 0) {
m_lWeatherRoutes->SetItem(index, columns[TACKS], weatherroute->Tacks);
Expand Down

0 comments on commit 56ad821

Please sign in to comment.