Nokia 5110 LCD number display problem
Look at line 55, where you are doing this

temperature = newSetpoint;


There is no reason to give temperature the same value as the set point. It does not make sense. And the temperature variable is the same, that you are using to display.

So, while you are changing the setpoint, the temperatur variable gets overwritten with the setpoint. When you are not changing it anymore, the measured temperature is still in this variable, when you are displaying it.

Just remove the mentioned line.