File diff r2951:a52cbb930051 → r2952:e97f823d2dbe
widget.c
Show inline comments
 
@@ -468,25 +468,25 @@ static int GetDropdownItem(const Window 
 

	
 
	// Skip hidden items -- +1 for each hidden item before the clicked item.
 
	for (counter = 0; item >= counter; ++counter)
 
		if (HASBIT(WP(w,dropdown_d).hidden_state, counter)) item++;
 

	
 
	return item;
 
}
 

	
 
static void DropdownMenuWndProc(Window *w, WindowEvent *e)
 
{
 
	int item;
 

	
 
	switch(e->event) {
 
	switch (e->event) {
 
		case WE_PAINT: {
 
			int x,y,i,sel;
 

	
 
			DrawWindowWidgets(w);
 

	
 
			x = 1;
 
			y = 2;
 
			sel    = WP(w,dropdown_d).selected_index;
 

	
 
			for (i = 0; WP(w,dropdown_d).items[i] != INVALID_STRING_ID; i++) {
 
				if (HASBIT(WP(w,dropdown_d).hidden_state, i)) {
 
					sel--;