Adding on to this, I believe viewing all cities and inadvertently annexing them does not add the expected unhappiness to your civilization. Only when you save/load does the unhappiness correct itself.
For example, I had a rather large, sprawling empire when I accepted two peace agreements with other large civs. I got about 10 good sized cities from each, bringing my total number of cities to about 50. Before view/annex, I had roughly 10 excess happiness. After view/annex, it dropped to about -5, then shot up to about +15 once I connected them to my capital. Keep in mind just about all were annexed automatically and should have had enormous unhappiness. I saved a while later with about +40 happiness, took a break, then reloaded my game only to find -105 happiness. The huge unhappiness is probably correct, but until I reloaded I was sitting pretty and everything was operating as if I actually was happy.
If your civ is small, it might not be obvious that there's a problem. Mine was giant and the bug is rather significant.