Changeset - r13159:03d1e6e6c70a
[Not reviewed]
master
0 6 0
rubidium - 15 years ago 2009-09-30 21:07:54
rubidium@openttd.org
(svn r17674) -Codechange: replace SetDirty + OnInvalidateData with InvalidateData (which does the same). Also call InvalidateData in a few cases where that was actually meant.
6 files changed with 10 insertions and 18 deletions:
0 comments (0 inline, 0 general)
src/ai/ai_gui.cpp
Show inline comments
 
@@ -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;
 
			}
 

	
src/misc_gui.cpp
Show inline comments
 
@@ -1176,7 +1176,7 @@ void QueryString::HandleEditBox(Window *
 
		 * 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 QueryS
 
			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 */
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -489,7 +489,7 @@ struct NetworkChatWindow : public QueryS
 
				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);
src/news_gui.cpp
Show inline comments
 
@@ -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();
 
	}
 
};
 

	
src/rail_gui.cpp
Show inline comments
 
@@ -1632,8 +1632,7 @@ public:
 
			default: break;
 
		}
 

	
 
		this->SetDirty();
 
		this->OnInvalidateData();
 
		this->InvalidateData();
 
	}
 

	
 
	virtual void OnInvalidateData(int data = 0)
src/settings_gui.cpp
Show inline comments
 
@@ -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
0 comments (0 inline, 0 general)