niknetniko / opa

Qt/KDE-based genealogy program
GNU General Public License v3.0
0 stars 0 forks source link

Investigate manual submit on QDataWidgetMapper #39

Open niknetniko opened 5 days ago

niknetniko commented 5 days ago

Currently, using manual submit on QDataWidgetMapper does not seem to work: only the first change is saved, while the remainder is discarded.

I think this happens because the models use auto-submit, so it seems when the mapper submits the first change, the model saves and refreshes, meaning the mapper discards the other changes.

The question now is: how do I fix this? Either I am using it wrong or Qt has a bug. A possibility might be to temnporarily change the submit mode on the model when submitting the mapper changes. Another might be to investigate not using auto submit on the models. Do we need that?

Currently it works, but the cancel button of edit windows does not work, since the data is already saved directly into the database.