Exemplo n.º 1
0
static void OnTargetClicked(WindowControl * Sender){
  (void)Sender;
  wf->SetVisible(false);
  dlgTarget();
  // find start value for range (it may have changed)
  Range = AdjustAATTargets(2.0);
  RefreshCalculator();
  wf->SetVisible(true);
}
Exemplo n.º 2
0
void dlgAddMultiSelectListDetailsDialog(int Index) {
    int iLastTaskPoint = 0;
    while (ValidTaskPoint(iLastTaskPoint))
        iLastTaskPoint++;
    iLastTaskPoint--;
    if ((Index >= 0) && (Index < iNO_ELEMENTS)) {
        switch (Elements[Index].type) {
        case IM_AIRSPACE:
            wf->SetTimerNotify(0,NULL);
            LKASSERT(Elements[Index].ptr);
            CAirspaceManager::Instance().PopupAirspaceDetail(static_cast<CAirspace*>(Elements[Index].ptr));
            break;

        case IM_WAYPOINT:
            wf->SetTimerNotify(0,NULL);
            LKASSERT(Elements[Index].iIdx < (int)WayPointList.size());
            SelectedWaypoint = Elements[Index].iIdx;
            wf->SetTimerNotify(0,NULL);
            PopupWaypointDetails();
            break;

        case IM_TASK_PT:
            wf->SetTimerNotify(0,NULL);
            LKASSERT(Elements[Index].iIdx <= MAXTASKPOINTS);
            LKASSERT(iLastTaskPoint>=0);
            RealActiveWaypoint = -1;
            if (Elements[Index].iIdx == 0)
                dlgTaskWaypointShowModal(Elements[Index].iIdx, 0, false, true);
            else {
                if (Elements[Index].iIdx == iLastTaskPoint)
                    dlgTaskWaypointShowModal(Elements[Index].iIdx, 2, false, true);
                else {
                    if ((AATEnabled) && (CALCULATED_INFO.Flying) && (!IsMultiMapNoMain())) {
                        wf->SetModalResult(mrOK);
                        wf->SetVisible(false);
                        dlgTarget(Elements[Index].iIdx);
                    } else {
                        dlgTaskWaypointShowModal(Elements[Index].iIdx, 1, false, true);
                    }
                }
            }
            break;
        } // switch
    } // if Index..
}