summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-30 21:07:54 +0000
committerrubidium <rubidium@openttd.org>2009-09-30 21:07:54 +0000
commitc847f5c04e15920d6f4d9a80e181ffc63e61264a (patch)
tree9f80b07df68b2aa6c53c11a8be64e4cc4d690737
parent00324050930287e25d9a616f12cdf1421c3445e7 (diff)
downloadopenttd-c847f5c04e15920d6f4d9a80e181ffc63e61264a.tar.xz
(svn r17674) -Codechange: replace SetDirty + OnInvalidateData with InvalidateData (which does the same). Also call InvalidateData in a few cases where that was actually meant.
-rw-r--r--src/ai/ai_gui.cpp3
-rw-r--r--src/misc_gui.cpp4
-rw-r--r--src/network/network_chat_gui.cpp2
-rw-r--r--src/news_gui.cpp7
-rw-r--r--src/rail_gui.cpp3
-rw-r--r--src/settings_gui.cpp9
6 files changed, 10 insertions, 18 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index 2f5135444..c1139bbcf 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -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;
}
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 4e16474e4..ada8f7227 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -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 */
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp
index f4fa5d712..317b547c2 100644
--- a/src/network/network_chat_gui.cpp
+++ b/src/network/network_chat_gui.cpp
@@ -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);
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index 0cb3d7ca1..f704ca1d4 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -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();
}
};
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 3f42242f7..7c0641002 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -1632,8 +1632,7 @@ public:
default: break;
}
- this->SetDirty();
- this->OnInvalidateData();
+ this->InvalidateData();
}
virtual void OnInvalidateData(int data = 0)
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 6886d8cbc..585223509 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -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