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

[UI] Minor - Bad order when sorting by "Active" in the Masternodes tab #92

Closed
sabhiram opened this issue Apr 5, 2017 · 2 comments
Closed
Labels

Comments

@sabhiram
Copy link

sabhiram commented Apr 5, 2017

If you sort the MNs by "Active" time, it will place 9d as older than 99d. This should be super easy to fix :)

@Fuzzbawls
Copy link
Collaborator

https://github.com/PIVX-Project/PIVX/blob/master/src/qt/masternodelist.cpp#L2

Current coding standards doc: https://github.com/PIVX-Project/PIVX/blob/master/doc/coding.md (this will be changing to a different filename shortly)

@sabhiram
Copy link
Author

sabhiram commented Apr 5, 2017

The simple way to fix this would be to fix DurationToDHMS to pad days like we do hours, but thats icky.

The right way to fix this is to probably subclass QTableWidgetItem to something like DHMSTableWidgetItem which is constructed using the duration in seconds and automagically uses that private member to do the comparison while displaying some nicely human friendli-ized text.

If this is not fixed in the next few days, and I find myself wanting to compile my wallet - ill take a stab at this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants