Created
August 14, 2012 06:46
-
-
Save geeksunny/3346990 to your computer and use it in GitHub Desktop.
Fix for PyQt's _triggered() functions being double called.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Instead of this... | |
def on_actionBuild_Zip_triggered(self): | |
[...] | |
# ... We do this. | |
def on_actionBuild_Zip_triggered(self, checked=None): | |
if checked is None: return # Makes certain the action does not get ran twice. | |
[...] | |
# This ensures that when it does get called twice, the second time will be ignored immediately. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment