Fix focusing on entities on the main viewport#3152
Fix focusing on entities on the main viewport#3152AaronVanGeffen merged 2 commits intoOpenLoco:masterfrom
Conversation
|
Removing What's going wrong here is that @ZehMatt, could you look into this? |
I've had a look and this does make sense as this is for the main window which doesn't have a saved view so the saved view is always empty. The being followed state is being stored in |
So i think the main issue is that the main window doesn't operate like all the others and the viewport focus on main code hasn't accounted for the fact it doesn't work the same. Either we should make main work like all the other windows or we should remove these checks and rename the functions to make it clear they are only for use with main. Here is my proposed patch that moves the function to make it clear its for working on main only |
It said viewportCentreMain() could be const Update CHANGELOG.md Code comment accuracy
a16785a to
404e029
Compare
|
I've applied my suggested change of movign the functions. Think this is now good to go. |
Removesand caused following (and unfollowing) vehicles on the main view to not work.savedView.isEmpty()checks from Window methods related to focusing viewports on entities, as they served no clear purpose (correct me if I'm wrong!)Fixes #3135