ship_gui.c
changeset 4426 291490691472
parent 4414 ed5b85ff5b0a
child 4427 cacdecf56fdf
equal deleted inserted replaced
4425:cff9af513dec 4426:291490691472
   954 {   WIDGETS_END},
   954 {   WIDGETS_END},
   955 };
   955 };
   956 
   956 
   957 static void PlayerShipsWndProc(Window *w, WindowEvent *e)
   957 static void PlayerShipsWndProc(Window *w, WindowEvent *e)
   958 {
   958 {
   959 	OrderID order = GB(w->window_number, 16, 16);
   959 	OrderID order = INVALID_ORDER;
   960 	/* Sorting a shared order list relies on station being set to INVALID_STATION */
   960 	StationID station = INVALID_STATION;
   961 	/* If station is not INVALID_STATION, then order is never used and we don't care what it contains */
       
   962 	StationID station = (w->window_number & SHARE_FLAG) ? INVALID_STATION : order;
       
   963 	PlayerID owner = GB(w->window_number, 0, 8);
   961 	PlayerID owner = GB(w->window_number, 0, 8);
   964 	vehiclelist_d *vl = &WP(w, vehiclelist_d);
   962 	vehiclelist_d *vl = &WP(w, vehiclelist_d);
       
   963 
       
   964 	if (w->window_number & SHARE_FLAG) {
       
   965 		order = GB(w->window_number, 16, 16);
       
   966 	} else {
       
   967 		station = GB(w->window_number, 16, 16);
       
   968 	}
   965 
   969 
   966 	switch (e->event) {
   970 	switch (e->event) {
   967 	case WE_PAINT: {
   971 	case WE_PAINT: {
   968 		int x = 2;
   972 		int x = 2;
   969 		int y = PLY_WND_PRC__OFFSET_TOP_WIDGET;
   973 		int y = PLY_WND_PRC__OFFSET_TOP_WIDGET;