public void setSeatsMode() {
		System.out.println("setSeatsMode called hushed?: "+hush_setSeatsMode);
		if( hush_setSeatsMode) {
			return;
		}
		hush_setSeatsMode = true;
		boolean was_total = Settings.seats_mode  == Settings.SEATS_MODE_TOTAL;
		int prev_total_seats = Settings.total_seats();
		Settings.seats_mode = this.lblTotalSeats.isSelected() ? Settings.SEATS_MODE_TOTAL : Settings.SEATS_MODE_PER_DISTRICT;
		boolean is_total = Settings.seats_mode  == Settings.SEATS_MODE_TOTAL;
		textFieldTotalSeats.setEnabled(is_total);
		textFieldSeatsPerDistrict.setEnabled(!is_total);
		textFieldNumDistricts.setEnabled(!is_total);
		chckbxNewCheckBox.setEnabled(is_total);
		if( is_total) {
			textFieldSeatsPerDistrict.setText("");
			if( !was_total) {
				textFieldTotalSeats.setText(""+(int)(prev_total_seats*5));
				Settings.seats_number_total = prev_total_seats*5;
			}
			try {
				int seats = Integer.parseInt(textFieldTotalSeats.getText());
				int[] sc = Settings.getSeatDistribution(seats);
				int tot = 0;
				for( int i = 0; i < sc.length; i++) {
					tot += sc[i];
				}
				textFieldNumDistricts.setText(""+tot);
				Settings.num_districts = tot;
			} catch (Exception ex) {
				
			}
		} else {
			if( was_total) {
				textFieldSeatsPerDistrict.setText("1");
				textFieldNumDistricts.setText(""+prev_total_seats);
				Settings.num_districts = prev_total_seats;
			} else {
				//textFieldTotalSeats.setText(""+(Settings.num_districts*Settings.seats_number_per_district));
			}
		}
		try {
			featureCollection.ecology.resize_districts();
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		double num_features = featureCollection.features.size();
		double combinations = num_features * Math.log((double)Settings.num_districts);
		System.out.println("log combinations: "+combinations);
		panelStats.getStats();
		hush_setSeatsMode = false;
		System.out.println("setSeatsMode returned");
	}