Changeset - r17384:23b210c0ef61
[Not reviewed]
master
0 5 0
frosch - 13 years ago 2011-02-24 21:48:06
frosch@openttd.org
(svn r22140) -Fix (r22135): I like the letter 'l' nevertheless. (Alberth)
5 files changed with 14 insertions and 14 deletions:
0 comments (0 inline, 0 general)
src/newgrf_debug_gui.cpp
Show inline comments
 
@@ -517,13 +517,13 @@ void DeleteNewGRFInspectWindow(GrfSpecFe
 

	
 
	WindowNumber wno = GetInspectWindowNumber(feature, index);
 
	DeleteWindowById(WC_NEWGRF_INSPECT, wno);
 

	
 
	/* Reinitialise the land information window to remove the "debug" sprite if needed.
 
	 * Note: Since we might be called from a command here, it is important to not execute
 
	 * the invalidation immediatelly. The landinfo window tests commands itself. */
 
	 * the invalidation immediately. The landinfo window tests commands itself. */
 
	InvalidateWindowData(WC_LAND_INFO, 0, 1);
 
}
 

	
 
/**
 
 * Can we inspect the data given a certain feature and index.
 
 * The index is normally an in-game location/identifier, such
src/train_cmd.cpp
Show inline comments
 
@@ -261,13 +261,13 @@ void Train::ConsistChanged(bool same_len
 
	/* recalculate cached weights and power too (we do this *after* the rest, so it is known which wagons are powered and need extra weight added) */
 
	this->CargoChanged();
 

	
 
	if (this->IsFrontEngine()) {
 
		this->UpdateAcceleration();
 
		SetWindowDirty(WC_VEHICLE_DETAILS, this->index);
 
		InvalidateWindowData(WC_VEHICLE_REFIT, this->index); // Important, do not invalidate immediatelly. The refit window tests commands.
 
		InvalidateWindowData(WC_VEHICLE_REFIT, this->index); // Important, do not invalidate immediately. The refit window tests commands.
 
	}
 
}
 

	
 
/**
 
 * Get the stop location of (the center) of the front vehicle of a train at
 
 * a platform of a station.
 
@@ -1086,13 +1086,13 @@ static void NormaliseTrainHead(Train *he
 
	UpdateTrainGroupID(head);
 

	
 
	/* Not a front engine, i.e. a free wagon chain. No need to do more. */
 
	if (!head->IsFrontEngine()) return;
 

	
 
	/* Update the refit button and window */
 
	InvalidateWindowData(WC_VEHICLE_REFIT, head->index); // Important, do not invalidate immediatelly. The refit window tests commands.
 
	InvalidateWindowData(WC_VEHICLE_REFIT, head->index); // Important, do not invalidate immediately. The refit window tests commands.
 
	SetWindowWidgetDirty(WC_VEHICLE_VIEW, head->index, VVW_WIDGET_REFIT_VEH);
 

	
 
	/* If we don't have a unit number yet, set one. */
 
	if (head->unitnumber != 0) return;
 
	head->unitnumber = GetFreeUnitNumber(VEH_TRAIN);
 
}
src/vehicle_gui.cpp
Show inline comments
 
@@ -1117,13 +1117,13 @@ static inline void ChangeVehicleWindow(W
 

	
 
		/* Update vehicle drag data */
 
		if (_thd.window_class == window_class && _thd.window_number == (WindowNumber)from_index) {
 
			_thd.window_number = to_index;
 
		}
 

	
 
		/* Notify the window immediatelly, without scheduling. */
 
		/* Notify the window immediately, without scheduling. */
 
		w->InvalidateData();
 
	}
 
}
 

	
 
/**
 
 * Report a change in vehicle IDs (due to autoreplace) to affected vehicle windows.
src/window.cpp
Show inline comments
 
@@ -2474,48 +2474,48 @@ void SetWindowClassesDirty(WindowClass c
 
		if (w->window_class == cls) w->SetDirty();
 
	}
 
}
 

	
 
/**
 
 * Mark window data of the window of a given class and specific window number as invalid (in need of re-computing)
 
 * Note that by default the invalidation is not executed immediatelly but is scheduled till the next redraw.
 
 * Note that by default the invalidation is not executed immediately but is scheduled till the next redraw.
 
 * The asynchronous execution is important to prevent GUI code being executed from command scope.
 
 * @param cls Window class
 
 * @param number Window number within the class
 
 * @param data The data to invalidate with
 
 * @param immediatelly If true then do not schedule the event, but execute immediatelly.
 
 * @param immediately If true then do not schedule the event, but execute immediately.
 
 */
 
void InvalidateWindowData(WindowClass cls, WindowNumber number, int data, bool immediatelly)
 
void InvalidateWindowData(WindowClass cls, WindowNumber number, int data, bool immediately)
 
{
 
	Window *w;
 
	FOR_ALL_WINDOWS_FROM_BACK(w) {
 
		if (w->window_class == cls && w->window_number == number) {
 
			if (immediatelly) {
 
			if (immediately) {
 
				w->InvalidateData(data);
 
			} else {
 
				w->ScheduleInvalidateData(data);
 
			}
 
		}
 
	}
 
}
 

	
 
/**
 
 * Mark window data of all windows of a given class as invalid (in need of re-computing)
 
 * Note that by default the invalidation is not executed immediatelly but is scheduled till the next redraw.
 
 * Note that by default the invalidation is not executed immediately but is scheduled till the next redraw.
 
 * The asynchronous execution is important to prevent GUI code being executed from command scope.
 
 * @param cls Window class
 
 * @param data The data to invalidate with
 
 * @param immediatelly If true then do not schedule the event, but execute immediatelly.
 
 * @param immediately If true then do not schedule the event, but execute immediately.
 
 */
 
void InvalidateWindowClassesData(WindowClass cls, int data, bool immediatelly)
 
void InvalidateWindowClassesData(WindowClass cls, int data, bool immediately)
 
{
 
	Window *w;
 

	
 
	FOR_ALL_WINDOWS_FROM_BACK(w) {
 
		if (w->window_class == cls) {
 
			if (immediatelly) {
 
			if (immediately) {
 
				w->InvalidateData(data);
 
			} else {
 
				w->ScheduleInvalidateData(data);
 
			}
 
		}
 
	}
src/window_func.h
Show inline comments
 
@@ -31,14 +31,14 @@ int GetMainViewBottom();
 
void InitWindowSystem();
 
void UnInitWindowSystem();
 
void ResetWindowSystem();
 
void SetupColoursAndInitialWindow();
 
void InputLoop();
 

	
 
void InvalidateWindowData(WindowClass cls, WindowNumber number, int data = 0, bool immediatelly = false);
 
void InvalidateWindowClassesData(WindowClass cls, int data = 0, bool immediatelly = false);
 
void InvalidateWindowData(WindowClass cls, WindowNumber number, int data = 0, bool immediately = false);
 
void InvalidateWindowClassesData(WindowClass cls, int data = 0, bool immediately = false);
 

	
 
void DeleteNonVitalWindows();
 
void DeleteAllNonVitalWindows();
 
void DeleteConstructionWindows();
 
void HideVitalWindows();
 
void ShowVitalWindows();
0 comments (0 inline, 0 general)