(svn r25987) [1.3] -Backport from trunk:

- Fix: When clearing font cache, also clear layout cache [FS#5737] (r25860)
- Fix: Goto button in order window was not always lowered when it should [FS#5783] (r25858, 25857)
- Fix: Searching for a suitable font failed, if one of the fonts had no '?' glyph, and no baseset is installed [FS#5704] (r25822, r25820)
- Fix: Sprite 0 was considered available, even if no baseset was loaded (r25821)
This commit is contained in:
rubidium
2013-11-13 21:53:40 +00:00
parent 33ab06a9da
commit 04fc4595cf
15 changed files with 59 additions and 22 deletions
+8 -5
View File
@@ -481,6 +481,7 @@ struct OrdersWindow : public Window {
private:
/** Under what reason are we using the PlaceObject functionality? */
enum OrderPlaceObjectState {
OPOS_NONE,
OPOS_GOTO,
OPOS_CONDITIONAL,
OPOS_SHARE,
@@ -631,7 +632,6 @@ private:
*/
void OrderClick_Conditional(int i)
{
this->LowerWidget(WID_O_GOTO);
this->SetWidgetDirty(WID_O_GOTO);
SetObjectToPlaceWnd(ANIMCURSOR_PICKSTATION, PAL_NONE, HT_NONE, this);
this->goto_type = OPOS_CONDITIONAL;
@@ -643,7 +643,6 @@ private:
*/
void OrderClick_Share(int i)
{
this->LowerWidget(WID_O_GOTO);
this->SetWidgetDirty(WID_O_GOTO);
SetObjectToPlaceWnd(ANIMCURSOR_PICKSTATION, PAL_NONE, HT_VEHICLE, this);
this->goto_type = OPOS_SHARE;
@@ -810,6 +809,7 @@ public:
this->selected_order = -1;
this->order_over = INVALID_VEH_ORDER_ID;
this->goto_type = OPOS_NONE;
this->owner = v->owner;
this->UpdateAutoRefitState();
@@ -1101,7 +1101,11 @@ public:
virtual void OnPaint()
{
if (this->vehicle->owner != _local_company) this->selected_order = -1; // Disable selection any selected row at a competitor order window.
if (this->vehicle->owner != _local_company) {
this->selected_order = -1; // Disable selection any selected row at a competitor order window.
} else {
this->SetWidgetLoweredState(WID_O_GOTO, this->goto_type != OPOS_NONE);
}
this->DrawWidgets();
}
@@ -1189,7 +1193,6 @@ public:
switch (widget) {
case WID_O_ORDER_LIST: {
if (this->goto_type == OPOS_CONDITIONAL) {
this->goto_type = OPOS_GOTO;
VehicleOrderID order_id = this->GetOrderFromPt(_cursor.pos.y - this->top);
if (order_id != INVALID_VEH_ORDER_ID) {
Order order;
@@ -1477,7 +1480,7 @@ public:
virtual void OnPlaceObjectAbort()
{
this->RaiseWidget(WID_O_GOTO);
this->goto_type = OPOS_NONE;
this->SetWidgetDirty(WID_O_GOTO);
/* Remove drag highlighting if it exists. */