Esempio n. 1
0
static void
FilterMode(bool direction)
{
  if (direction) {
    dialog_state.distance = fixed(-1);
    dialog_state.direction = WILDCARD;

    DataFieldEnum *df = (DataFieldEnum *)distance_control->GetDataField();
    df->Set(WILDCARD);
    distance_control->RefreshDisplay();

    df = (DataFieldEnum *)direction_control->GetDataField();
    df->Set(WILDCARD);
    direction_control->RefreshDisplay();
  } else {
    DataFieldString *df = (DataFieldString *)name_control->GetDataField();
    df->Set(_T(""));
    name_control->RefreshDisplay();
  }
}
Esempio n. 2
0
static void FilterMode(bool direction) {
    if (direction) {
        distance_filter = fixed_minus_one;
        direction_filter = WILDCARD;
        if (wpDistance) {
            DataFieldEnum &df = *(DataFieldEnum *)wpDistance->GetDataField();
            df.Set(WILDCARD);
            wpDistance->RefreshDisplay();
        }
        if (wpDirection) {
            DataFieldEnum &df = *(DataFieldEnum *)wpDirection->GetDataField();
            df.Set(WILDCARD);
            wpDirection->RefreshDisplay();
        }
    } else {
        if (wpName) {
            DataFieldString *df = (DataFieldString *)wpName->GetDataField();
            df->Set(_T(""));
            wpName->RefreshDisplay();
        }
    }
}