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

Improve part list #519

Merged
merged 26 commits into from
Aug 8, 2024
Merged

Improve part list #519

merged 26 commits into from
Aug 8, 2024

Conversation

Bouni
Copy link
Owner

@Bouni Bouni commented Aug 7, 2024

This PR will replace the ListCtrl used for the main parts list with a DataViewCtrl and a PyDataViewModel.

We will be able to sort the list without having to query the database nd re-populate the list every time.

@Bouni Bouni added the enhancement New feature or request label Aug 7, 2024
@Bouni Bouni linked an issue Aug 7, 2024 that may be closed by this pull request
@Bouni Bouni changed the title WIP: Improve part list Improve part list Aug 7, 2024
@Bouni Bouni requested a review from chmorgan August 7, 2024 11:59
@Bouni
Copy link
Owner Author

Bouni commented Aug 7, 2024

I guess I sucessfully migrated everything to the new list 🥳

As I said, a heavy change, so please test and let me know if you find errors!

I realized that we have some minor issues which are not introduced by this PR, but I guess I'll fix them later.

@Bouni
Copy link
Owner Author

Bouni commented Aug 7, 2024

Here's a screenshot, not much visual difference:

grafik

But some minor details that I find quite handy:

  • Zebra style rows for better visibility
  • Small Arrows on the column headers that show the sorting direction
  • I decided to use an Icon to show the layer (TOP or BOT)

Copy link
Collaborator

@chmorgan chmorgan left a comment

Choose a reason for hiding this comment

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

Looks like we've got a few hardcoded column indexes still at the end there but those are legacy. Overall PR looks clean, no complaints, and is moving in a good direction.

datamodel.py Outdated Show resolved Hide resolved
mainwindow.py Outdated Show resolved Hide resolved
mainwindow.py Outdated Show resolved Hide resolved
@@ -405,91 +409,6 @@ def __init__(self, parent, kicad_provider=KicadProvider()):
rotation.SetSortable(True)
side.SetSortable(True)

Copy link
Collaborator

Choose a reason for hiding this comment

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

ahh k, could always rebase and fixup the previous change with this one if that makes sense with your git-fu

Copy link
Owner Author

Choose a reason for hiding this comment

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

No idea what you mean by that 😅

@Bouni Bouni merged commit 684a018 into main Aug 8, 2024
2 checks passed
@Bouni Bouni deleted the improve-part-list branch September 30, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve part list
2 participants