mirror of https://github.com/OpenTTD/OpenTTD
(svn r17674) -Codechange: replace SetDirty + OnInvalidateData with InvalidateData (which does the same). Also call InvalidateData in a few cases where that was actually meant.
parent
0032405093
commit
c847f5c04e
|
@ -586,8 +586,7 @@ struct AIConfigWindow : public Window {
|
|||
|
||||
if (slot == 0 || slot > _settings_newgame.difficulty.max_no_competitors) slot = INVALID_COMPANY;
|
||||
this->selected_slot = (CompanyID)slot;
|
||||
this->OnInvalidateData(0);
|
||||
this->SetDirty();
|
||||
this->InvalidateData();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1176,7 +1176,7 @@ void QueryString::HandleEditBox(Window *w, int wid)
|
|||
* so the caret changes appropriately. */
|
||||
if (w->window_class != WC_OSK) {
|
||||
Window *w_osk = FindWindowById(WC_OSK, 0);
|
||||
if (w_osk != NULL && w_osk->parent == w) w_osk->OnInvalidateData();
|
||||
if (w_osk != NULL && w_osk->parent == w) w_osk->InvalidateData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1322,7 +1322,7 @@ struct QueryStringWindow : public QueryStringBaseWindow
|
|||
default: NOT_REACHED();
|
||||
case HEBR_EDITING: {
|
||||
Window *osk = FindWindowById(WC_OSK, 0);
|
||||
if (osk != NULL && osk->parent == this) osk->OnInvalidateData();
|
||||
if (osk != NULL && osk->parent == this) osk->InvalidateData();
|
||||
} break;
|
||||
case HEBR_CONFIRM: this->OnOk();
|
||||
/* FALL THROUGH */
|
||||
|
|
|
@ -489,7 +489,7 @@ struct NetworkChatWindow : public QueryStringBaseWindow {
|
|||
default: NOT_REACHED();
|
||||
case HEBR_EDITING: {
|
||||
Window *osk = FindWindowById(WC_OSK, 0);
|
||||
if (osk != NULL && osk->parent == this) osk->OnInvalidateData();
|
||||
if (osk != NULL && osk->parent == this) osk->InvalidateData();
|
||||
} break;
|
||||
case HEBR_CONFIRM:
|
||||
SendChat(this->text.buf, this->dtype, this->dest);
|
||||
|
|
|
@ -996,7 +996,6 @@ struct MessageHistoryWindow : Window {
|
|||
virtual void OnResize(Point delta)
|
||||
{
|
||||
this->vscroll.UpdateCapacity(delta.y / this->line_height);
|
||||
this->OnInvalidateData(0);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1160,8 +1159,7 @@ struct MessageOptionsWindow : Window {
|
|||
|
||||
case WIDGET_NEWSOPT_SOUNDTICKER: // Change ticker sound on/off
|
||||
_news_ticker_sound ^= 1;
|
||||
this->OnInvalidateData(0);
|
||||
this->SetWidgetDirty(widget);
|
||||
this->InvalidateData();
|
||||
break;
|
||||
|
||||
default: { // Clicked on the [<] .. [>] widgets
|
||||
|
@ -1187,8 +1185,7 @@ struct MessageOptionsWindow : Window {
|
|||
this->SetMessageButtonStates(index, i);
|
||||
_news_type_data[i].display = (NewsDisplay)index;
|
||||
}
|
||||
this->OnInvalidateData(0);
|
||||
this->SetDirty();
|
||||
this->InvalidateData();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1632,8 +1632,7 @@ public:
|
|||
default: break;
|
||||
}
|
||||
|
||||
this->SetDirty();
|
||||
this->OnInvalidateData();
|
||||
this->InvalidateData();
|
||||
}
|
||||
|
||||
virtual void OnInvalidateData(int data = 0)
|
||||
|
|
|
@ -353,8 +353,7 @@ struct GameOptionsWindow : Window {
|
|||
|
||||
T::SetSet(name);
|
||||
this->reload = true;
|
||||
this->SetDirty();
|
||||
this->OnInvalidateData(0);
|
||||
this->InvalidateData();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -625,8 +624,7 @@ public:
|
|||
this->RaiseWidget(GDW_LVL_EASY + this->opt_mod_temp.difficulty.diff_level);
|
||||
SetDifficultyLevel(3, &this->opt_mod_temp.difficulty); // set difficulty level to custom
|
||||
this->LowerWidget(GDW_LVL_CUSTOM);
|
||||
this->OnInvalidateData();
|
||||
this->SetDirty();
|
||||
this->InvalidateData();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -639,8 +637,7 @@ public:
|
|||
this->RaiseWidget(GDW_LVL_EASY + this->opt_mod_temp.difficulty.diff_level);
|
||||
SetDifficultyLevel(widget - GDW_LVL_EASY, &this->opt_mod_temp.difficulty);
|
||||
this->LowerWidget(GDW_LVL_EASY + this->opt_mod_temp.difficulty.diff_level);
|
||||
this->OnInvalidateData();
|
||||
this->SetDirty();
|
||||
this->InvalidateData();
|
||||
break;
|
||||
|
||||
case GDW_HIGHSCORE: // Highscore Table
|
||||
|
|
Loading…
Reference in New Issue