(svn r11924) -Codechange: All dropdowns now use the dropdown widget, so compatibility code can be removed
authorpeter1138
Sat, 19 Jan 2008 11:08:06 +0000
changeset 8854 6ec8a7e74a2a
parent 8853 7bc34ea0bfdc
child 8855 e7a6bbce5400
(svn r11924) -Codechange: All dropdowns now use the dropdown widget, so compatibility code can be removed
src/widgets/dropdown.cpp
--- a/src/widgets/dropdown.cpp	Fri Jan 18 22:55:02 2008 +0000
+++ b/src/widgets/dropdown.cpp	Sat Jan 19 11:08:06 2008 +0000
@@ -246,21 +246,17 @@
 		}
 	}
 
-	/* XXX Temporary fix to make dropdown compatible with separate widgets */
-	const Widget *wil = wi;
-	if (wi->type != WWT_DROPDOWN && wi->type != WWT_DROPDOWNIN) wil--;
-
 	Window *dw = AllocateWindow(
-		w->left + wil->left,
+		w->left + wi->left,
 		top,
-		wi->right - wil->left + 1,
+		wi->right - wi->left + 1,
 		height,
 		DropDownMenuWndProc,
 		WC_DROPDOWN_MENU,
 		_dropdown_menu_widgets);
 
 	dw->widget[0].color = wi->color;
-	dw->widget[0].right = wi->right - wil->left;
+	dw->widget[0].right = wi->right - wi->left;
 	dw->widget[0].bottom = height - 1;
 
 	dw->SetWidgetHiddenState(1, !scroll);