Tracial oscillation zero and Z-stability