I was having a technical problem that was unsolvable to me. It's about the context menu, that should be hidden on clicking/right-clicking somewhere else.
Parin told to me to insert some debbugs in the code to try to understand what was happening there.
To resolve it, the ideia was :
to prevent that more then one context menu were created every right mouse click, I have to ensure that the context menu will be closed if another instance of it is opened, in other words, I have to ensure that just one instance of the context menu is open each time it will called.
Thus, the verification I'm doing is:
if (self.context is not None):
self.context = None
With it, I verify if the context is the only one; if it is not, the context menu is removed and the context is assigned with None.
Gif to show how it is working well :-)
Parin told me also that a UI file should be used for large UIs and I should create a menu inside my code and add the options right there. Then, I insert the content of UI file in my code.
My branch on github is it, in case you wanna see my progress: https://github.com/elianerpereira/gtg/tree/geolocalized-tasks/GTG/plugins/geolocalized_tasks
If you have any question, let me know.
See you in next post!