AnthonyMichaelTDM / DRG-Save-Editor

Rock and stone!
GNU General Public License v3.0
115 stars 17 forks source link

Fixes crash on accounts without overclocks unlocked #100

Closed simon-wg closed 3 months ago

simon-wg commented 3 months ago

Quick and easy solution, if no overclocks are found we simply mark all as unaquired and skip the entire process of handling them.

Note that I have not tried what happens if you add overclocks to an account without them unlocked.

AnthonyMichaelTDM commented 3 months ago

I think I'd prefer if the whole Overclocks section of the UI was greyed out, perhaps with a message saying that "Weapon OCs not unlocked yet" or something

AnthonyMichaelTDM commented 3 months ago

this works as the backend handling of the issue though

simon-wg commented 3 months ago

Good idea, I'm taking a look at that right now

AnthonyMichaelTDM commented 3 months ago

could you write a test for these changes before I merge or is that not worth the effort?

simon-wg commented 3 months ago

wait a moment, I'm gonna add a text that tells the user that they haven't unlocked overclocks yet. That way we can avoid some unneccessary bug reports.

AnthonyMichaelTDM commented 3 months ago

sounds good, let me know (ping me) when it's all ready

simon-wg commented 3 months ago

alright, that will have to do for me for today, got work in 7 hours, so can't do the testing today.

simon-wg commented 3 months ago

I did try the testing a little bit, but got some issues related to having to create a widget in order to test that the QTreeWidget is disabled. If you or @wahlp want to have a go at it feel free, but I don't think it's too overly necessary to add a test for it.

AnthonyMichaelTDM commented 3 months ago

That's more than fair, I'll take a look. Thanks for all the work

AnthonyMichaelTDM commented 3 months ago

idk what's going on here, I'm not getting this error on my system ...

wahlp commented 3 months ago

the third test test_issue97 is hanging on my machine too.

tried copying this from main and put it at the top and they passed.

from PySide6.QtCore import QCoreApplication, Qt
QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_ShareOpenGLContexts, True)
wahlp commented 3 months ago

https://stackoverflow.com/questions/75497408/github-action-pytest-exit-code-134 can't believe this worked, nice

AnthonyMichaelTDM commented 3 months ago

huh, funky

AnthonyMichaelTDM commented 3 months ago

thanks for figuring that out though