Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Close the city view when city overview panel being closed due to selection change #12

Merged
merged 2 commits into from
Oct 29, 2016
Merged

Close the city view when city overview panel being closed due to selection change #12

merged 2 commits into from
Oct 29, 2016

Conversation

olegbl
Copy link

@olegbl olegbl commented Oct 29, 2016

When the selection changes (i.e. buying building with gold or starting a new building in a district), the city overview panel closes in order to show some on-map animation. However, the production panel remains open and the view remains zoomed in. This commit fixes the issue (tracked by bug #10).

…ction change

When the selection changes (i.e. buying building with gold or starting a
new building in a district), the city overview panel closes in order to
show some on-map animation. However, the production panel remains open
and the view remains zoomed in. This commit fixes the issue (tracked by
bug #10).
@@ -552,6 +552,7 @@ function OnCitySelectionChanged( ownerPlayerID:number, cityID:number, i:number,
Refresh();
else
Close();
UI.SetInterfaceMode(InterfaceModeTypes.SELECTION);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really this should be in Close() but I don't know all the callsites of Close() and hence don't want to introduce a different regression.

Copy link
Member

@chaorace chaorace Oct 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, really I want to reimplement how the prod panel behaves from vanilla again to get it right this time, but for the meantime this should fix the unexpected behavior

@chaorace chaorace merged commit 2858ba9 into CQUI-Org:master Oct 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants