Ejemplo n.º 1
0
static void
UpdateList()
{
  if (filter_data.type_index == TF_LAST_USED)
    FillLastUsedList(waypoint_list, LastUsedWaypoints::GetList(),
                     way_points);
  else
    FillList(waypoint_list, way_points, location, last_heading,
             filter_data);

  waypoint_list_control->SetLength(std::max(1, (int)waypoint_list.size()));
  waypoint_list_control->SetOrigin(0);
  waypoint_list_control->SetCursorIndex(0);
  waypoint_list_control->Invalidate();
}
Ejemplo n.º 2
0
static void
UpdateList()
{
  if (filter_data.type_index == TF_LAST_USED)
    FillLastUsedList(waypoint_select_info, last_used_waypoint_ids,
                     way_points, location);
  else
    FillList(waypoint_select_info, way_points, location, last_heading,
             filter_data);

  waypoint_list->SetLength(std::max(1, (int)waypoint_select_info.size()));
  waypoint_list->SetOrigin(0);
  waypoint_list->SetCursorIndex(0);
  waypoint_list->Invalidate();
}
Ejemplo n.º 3
0
static void
UpdateList()
{
  waypoint_list.clear();

  if (dialog_state.type_index == TypeFilter::LAST_USED)
    FillLastUsedList(waypoint_list, LastUsedWaypoints::GetList(),
                     way_points);
  else
    FillList(waypoint_list, way_points, location, last_heading,
             dialog_state);

  waypoint_list_control->SetLength(std::max(1, (int)waypoint_list.size()));
  waypoint_list_control->SetOrigin(0);
  waypoint_list_control->SetCursorIndex(0);
  waypoint_list_control->Invalidate();
}
Ejemplo n.º 4
0
void
WaypointListWidget::UpdateList()
{
  items.clear();

  if (dialog_state.type_index == TypeFilter::LAST_USED)
    FillLastUsedList(items, LastUsedWaypoints::GetList(),
                     way_points);
  else
    FillList(items, way_points, location, last_heading,
             dialog_state);

  auto &list = GetList();
  list.SetLength(std::max(1u, (unsigned)items.size()));
  list.SetOrigin(0);
  list.SetCursorIndex(0);
  list.Invalidate();
}