private void sortSlides() {
		// quick and dirty bubble sort, never going to be many slides so speed
		// not a problem
		for (int range = slideShow.getTree().size() - 1; range >= 0; range--) {
			int pos = 0;
			while (pos < range) {
				TreeEntity slide = slideShow.getTree().get(pos);
				TreeEntity nextSlide = slideShow.getTree().get(pos + 1);
				if (slide.getId() > nextSlide.getId()) {
					slideShow.getTree().set(pos, nextSlide);
					slideShow.getTree().set(pos + 1, slide);
				}
				pos++;
			}
		}
		// name all unnamed slides using their IDs
		for (int i = 0; i < slideShow.getTree().size(); i++) {
			if (null == slideShow.getTree().get(i).getHeading()) {
				slideShow.getTree().get(i).setHeading("Slide "
								+ String.valueOf(slideShow.getTree().get(i)
										.getId()));
			}
		}
	}