Esempio n. 1
0
void WeatherRouting::SetConfigurationRoute(RouteMapConfiguration configuration,
                                           WeatherRoute *weatherroute)
{
    if(m_bSkipUpdateCurrentItem)
        return;

    RouteMapOverlay *rmo = weatherroute->routemapoverlay;
    for(std::list<RouteMapOverlay*>::iterator it = m_RunningRouteMaps.begin();
        it != m_RunningRouteMaps.end(); it++)
        if(*it == rmo)
            (*it)->Stop();

    rmo->SetConfiguration(configuration);

    weatherroute->Update();

    for(long index = 0; index<m_lWeatherRoutes->GetItemCount(); index++)
    {
        WeatherRoute *wr = reinterpret_cast<WeatherRoute*>
        (wxUIntToPtr(m_lWeatherRoutes->GetItemData(index)));
        if(weatherroute == wr)
        {
            UpdateItem(index);
            break;
        }
    }
}
Esempio n. 2
0
void WeatherRouting::AddConfiguration(RouteMapConfiguration configuration)
{
    m_ConfigurationDialog.EditBoat();  // ????
    WeatherRoute *weatherroute = new WeatherRoute;
    RouteMapOverlay *routemapoverlay = weatherroute->routemapoverlay;
    routemapoverlay->SetConfiguration(configuration);
    routemapoverlay->Reset();
    weatherroute->Update();

    m_WeatherRoutes.push_back(weatherroute);
// Test WXOSX Crash hier
    wxListItem item;
    item.SetData(weatherroute);
    UpdateItem(m_lWeatherRoutes->InsertItem(item));   // Crash

    m_mDeleteAll->Enable();
    m_mComputeAll->Enable();
    m_mExportAll->Enable();
}