Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI/gmodeler: dialogs code refactoring #3816

Merged
merged 6 commits into from
Sep 9, 2024

Conversation

pesekon2
Copy link
Contributor

@pesekon2 pesekon2 commented Jun 14, 2024

  • ModelDataDialog
    • create dedicated _createElementControl method (make the __init__ method cleaner)
    • assign value directly to self.etype instead of doing it in two steps
    • create dedicated SetSizes method (avoid code duplicity in child classes)
  • ModelLoopDialog
    • create dedicated BindButtons method (make the __init__ method cleaner)
    • create dedicated InsertColumns method (make the __init__ method cleaner)
    • OnCheckItem - check for the existence of window before checking labels (the second check does not have to happen everytime and you avoid a getter call then)
  • VariableListCtrl
    • Populate - simplify - no need to run the same loop twice

@pesekon2 pesekon2 added the Python Related code is in Python label Jun 14, 2024
@pesekon2 pesekon2 requested a review from landam June 14, 2024 18:32
@pesekon2 pesekon2 self-assigned this Jun 14, 2024
@github-actions github-actions bot added the GUI wxGUI related label Jun 14, 2024
@pesekon2 pesekon2 changed the title wxGUI/gmodeler: refactoring wxGUI/gmodeler: dialogs code refactoring Sep 3, 2024
@pesekon2 pesekon2 marked this pull request as ready for review September 3, 2024 12:30
@landam landam added this to the 8.5.0 milestone Sep 9, 2024
@echoix echoix merged commit b1c8d10 into OSGeo:main Sep 9, 2024
26 checks passed
Mahesh1998 pushed a commit to Mahesh1998/grass that referenced this pull request Sep 19, 2024
* g.gui.gmodeler: start refactoring

* assign results from _getLabel() directly instead of using intermediate vars

* do not run Getlabel() if not needed

* VariableListCtrl: simplify (no need to run one loop twice)
@pesekon2 pesekon2 deleted the g_gui_gmodeler_refactoring branch January 7, 2025 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants