File diff r17388:4c1f53028687 → r17389:80d374d6031a
src/widget.cpp
Show inline comments
 
@@ -2556,15 +2556,15 @@ static int MakeWidgetTree(const NWidgetP
 
			int num_used = MakeWidgetTree(parts, count - total_used, &sub_ptr, biggest_index);
 
			parts += num_used;
 
			total_used += num_used;
 
		}
 

	
 
		/* Add sub_widget to parent container if available, otherwise return the widget to the caller. */
 
		if (nwid_cont) nwid_cont->Add(sub_widget);
 
		if (nwid_parent) nwid_parent->Add(sub_widget);
 
		if (!nwid_cont && !nwid_parent) {
 
		if (nwid_cont != NULL) nwid_cont->Add(sub_widget);
 
		if (nwid_parent != NULL) nwid_parent->Add(sub_widget);
 
		if (nwid_cont == NULL && nwid_parent == NULL) {
 
			*parent = sub_widget;
 
			return total_used;
 
		}
 
	}
 

	
 
	if (count == total_used) return total_used; // Reached the end of the array of parts?