PLE filters + building/unit/wonder filters clash

jtanner28

Chieftain
Joined
Nov 10, 2008
Messages
97
If you have the PLE-style unit filter buttons enabled and enter the city screen, the C2C building/unit/wonder filters that were introduced in SVN-1093 paste right on top of them. It get's all jumbled and looks terrible. I found the same issue while updating stuff in AND. I can't load C2C to verify this bug. I don't meet the min specs for C2C and hence cannot load it to directly test it but I figure the problem is there also. I checked the files in C2C SVN-3337 (the last entry where CvMainInterface.py was changed) and the pertinent code sections appear to be the same.

Anyway, to fix it, put these lines in CvMainInterface.py (at line 2513 for the C2C version):

Code:
			if self.bPLECurrentlyShowing:
				self.PLE.hidePlotListButtonPLEObjects(screen)
				self.PLE.hideUnitInfoPane()
				self.bPLECurrentlyShowing = False

As always, be careful with whitespace in python files. This fix will make the PLE filters hide whenever the city screen is up. The come right back when you exit the city screen. :)

It's just a little thing, but it bugged the heck out of me. I have incorporated the fix into AND SVN-582. I would appreciate it if someone could verify this bug in C2C and verify the solution. It appears to work correctly in AND now.
 
So, juts to check, you want that to after the Hurry button show... and before the Conscript button show sections of code? Will do. I had just complained that PLE was not working.

Edit PLE must have been turned off in c2c at some time as I can't turn them on to test your code. Having your code in there doesn't do anything nor cause errors.
 
So, juts to check, you want that to after the Hurry button show... and before the Conscript button show sections of code? Will do. I had just complained that PLE was not working.

Edit PLE must have been turned off in c2c at some time as I can't turn them on to test your code. Having your code in there doesn't do anything nor cause errors.
Maybe investigate with some debug prints what part of the PLE code is not reached. It is implemented in Python and show/hide of it is controlled from CvMainInterface.py
 
So, juts to check, you want that to after the Hurry button show... and before the Conscript button show sections of code? Will do. I had just complained that PLE was not working.

Edit PLE must have been turned off in c2c at some time as I can't turn them on to test your code. Having your code in there doesn't do anything nor cause errors.
It seems to be that only the draw method PLE in the BUG PLE options seems to work in displaying the PLE buttons at the moment. I am not sure why that is the case and I don't know that code well enough to fix it easily.
 
Top Bottom