Updating in real time issue when controlled by mode button

What I am trying to figure out is how to continuously update a 7 segment LED display when its state is controlled by Mode button. With my current setup my code correctly toggles through the different types of outputs onto the display, but once it is switched it no longer updates. The only way to get the display to update is by cycling through all of the types, then it will update it.
Also another minor thing that I would like to fix is that when the display initially pops up it displays nothing until the mode button is pressed. This is probably related to the previous problem.

Below is the code, any help or direction is greatly appreciated.

const int digitPins[4] = {
  7,6,5,4}; //4 common CATHODE pins of the display (inverted the pins order)
const int clockPin = 11;    //74HC595 Pin 11
const int latchPin = 12;    //74HC595 Pin 12
const int dataPin = 13;     //74HC595 Pin 14
const int tempPin = A0;     //temperature sensor pin
const int lightPin = 0;    //light sensor pin
const int  buttonPin = 2;    // the pin that the pushbutton is attached to
const int modePin = 2; // Active HIGH, held low by 4.7K

// Variables will change:
int buttonPushCounter = 0;   // counter for the number of button presses
int buttonState = 0;         // current state of the button
int lastButtonState = 0;     // previous state of the button
int mode = 0; // Selector State (Initial state = ALL OFF)
int val = 0; // Pin 13 HIGH/LOW Status
int butState = 0; // Last Button State
int modeState = 0; // Last Mode State
int x = 0; // Mode type
int degreesC = 0, degreesF = 0, timeleft = 0, buttonCount, k;
const byte digit[12] =      //seven segment digits in bits


{
  B00111111, //0
  B00000110, //1
  B01011011, //2
  B01001111, //3
  B01100110, //4
  B01101101, //5
  B01111101, //6
  B00000111, //7
  B01111111, //8
  B01101111,  //9
  B00111001, //F
  B01110001  //C
};
int digitBuffer[4] = {
  0};
int digitScan = 0, high = 0, low = 1023;
float voltage, degreeC, degreeF, lightLevel, p = 0;

void setup(){               
  for(int i=0;i<4;i++)
  {
    pinMode(digitPins[i],OUTPUT);
  }

  pinMode(buttonPin, INPUT);  
  pinMode(tempPin, INPUT);
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT); 
  pinMode(tempPin, INPUT);
  pinMode(modePin, INPUT);
  Serial.begin(9600);

}

//writes the temperature on display
void updateDisp(){

  for(byte j=0; j<4; j++) {
    digitalWrite(digitPins[j], HIGH);
  } // Turns the display off. Changed to HIGH
  digitalWrite(latchPin, LOW); 
  shiftOut(dataPin, clockPin, MSBFIRST, B00000000);
  digitalWrite(latchPin, HIGH);

  delayMicroseconds(2);

  digitalWrite(digitPins[digitScan], LOW); //Changed to LOW for turning the leds on.

  digitalWrite(latchPin, LOW); 
  if(digitScan==2)
    shiftOut(dataPin, clockPin, MSBFIRST, (digit[digitBuffer[digitScan]] | B10000000)); //print the decimal point on the 3rd digit
  else
    shiftOut(dataPin, clockPin, MSBFIRST, digit[digitBuffer[digitScan]]);

  digitalWrite(latchPin, HIGH);

  digitScan++;
  if(digitScan>3) digitScan=0;
}

float getVoltage(int pin)
{
  return (analogRead(pin) * 0.004882814);
}

void Type() {
  val = digitalRead(modePin);

  // If we see a change in button state, increment mode value
  if (val != butState && val == HIGH){
    mode++;
  }

  butState = val; // Keep track of most recent button state

  // No need to keep setting pins *every* loop
  if (modeState != mode){

    // If no keys have been pressed yet don't execute
    // the switch code below
    // if (mode != 0) {

    switch (mode) {
      //case 1 is actually handled below as default

    case 2:
      Serial.println(mode);
      x = degreesC;
      break;
    case 3:
      Serial.println(mode);
      x = degreesF;
      break;
    default:
      mode = 1;
      x = timeleft;
      break;
    } // end switch
    // } // end of "if mode = 0" check
  } // end of ModeState check
  modeState = mode; // Keep track of mode recent mode value
}

void autoTune() {
  if (lightLevel < low) {
    low = lightLevel;
  }
  if (lightLevel > high) {
    high = lightLevel;
  }
  lightLevel = map(lightLevel, low+30, high-30, 20, 0);
}

void loop(){
  lightLevel = analogRead(lightPin);  

  //temperature and voltage calculations
  voltage = getVoltage(tempPin);
  degreeC = (voltage - 0.5) * 1000.0;   // converts the voltage to degrees Celsius. 
  degreesF = ((voltage - 0.5) * 1000.0) * (9.0/5.0) + 32.0; // converts degrees Celsius to Fahrenheit.
  degreesC = (int) degreeC; 
  degreesF = (int) degreesF;
  timeleft = (int) lightLevel;

  digitBuffer[3] = (int(x)%10);
  digitBuffer[2] = ((int(x)/10)%10);
  digitBuffer[1] = ((int(x)/100)%10);
  digitBuffer[0] = (int(x)/1000);
  if (digitBuffer[0]>=5) {
    digitBuffer[0] = 5;
  }
  else {
    digitBuffer[0] = 0;
  }
  delay(4);
  updateDisp();
  Type();
  autoTune();
}

edit: formatting

Below is the code, any help or direction is greatly appreciated.

I refuse to make the effort to read code that is randomly indented.

If you can't make the effort to 1) Keep your code properly indented 2) Use Tools + Auto Format 3) Delete useless code, instead of commenting it out I won't make the effort to read it.

There is nothing in the code that I did read that matches what you wrote. Why not use terms that are in the code?

Reformatted, sorry I don't know very much about programming to be honest. As for explaining the code, the function Type() controls the mode button and depending on what state the mode button is in x will equal what I want as the output (seen in void loop() ) which then goes to display (void updateDisp() ). I assume the problem arises because it only gets a new value (x) when I toggle modes, maybe there is a way to have it continuously pull values depending on the mode state? Hopefully this is the type of information that you want, if not feel free to ask away.

I can't understand your description of the problem or relate the description to the code you have posted. I'm lazy and I don't feel like spending 30 or 40 minutes trying to figure it out.

I suspect there is a lot of stuff in your sketch that is working properly and has nothing to do with the problem.

Could you produce a very short sketch with just enough in it to demonstrate the problem?

Alternatively (and less useful) can you give a clear description in English of what all the parts of your code do.

...R

As for explaining the code, the function Type() controls the mode button

How the hell do you control a switch in code? The switch is controlled by the user.

and depending on what state the mode button is in

Buttoned or not buttoned are the only two possible modes for a button. A [u]switch[/u] can be pressed or not pressed.

I assume the problem arises because it only gets a new value (x) when I toggle modes, maybe there is a way to have it continuously pull values depending on the mode state?

We have no idea what you are talking about when you say "it only gets a new value". There is no variable in your code called it.