~ubuntu-branches/debian/squeeze/freeciv/squeeze

« back to all changes in this revision

Viewing changes to client/control.c

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams
  • Date: 2010-02-08 07:36:40 UTC
  • mfrom: (1.2.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20100208073640-pzgcnz2z2tod5cu9
Tags: 2.1.11-1
* New upstream version.
* Bump to Standards-Version 3.8.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
303
303
/**************************************************************************
304
304
  ...
305
305
**************************************************************************/
306
 
static void current_focus_append(struct unit *punit)
 
306
static void current_focus_append(struct unit *punit, bool clear_orders)
307
307
{
308
308
  unit_list_append(current_focus, punit);
309
309
 
310
310
  punit->focus_status = FOCUS_AVAIL;
311
311
  refresh_unit_mapcanvas(punit, punit->tile, TRUE, FALSE);
312
312
 
313
 
  if (unit_selection_clears_orders) {
 
313
  if (clear_orders) {
314
314
    clear_unit_orders(punit);
315
315
  }
316
316
}
377
377
  }
378
378
 
379
379
  if (NULL != punit) {
380
 
    current_focus_append(punit);
 
380
     /* Always clears the orders the orders in this case, or it will be
 
381
      * impossible to issue orders on a non-idle unit. */
 
382
    current_focus_append(punit, TRUE);
381
383
    auto_center_on_focus_unit();
382
384
  }
383
385
 
411
413
    set_hover_state(NULL, HOVER_NONE, ACTIVITY_LAST, ORDER_LAST);
412
414
  }
413
415
 
414
 
  current_focus_append(punit);
 
416
  current_focus_append(punit, unit_selection_clears_orders);
415
417
  update_unit_info_label(current_focus);
416
418
  update_menus();
417
419
}