1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-25 17:53:07 +02:00

Avoid rewriting non-editable app settings

This is a workaround, see TODO in code for details.
This commit is contained in:
Maarten ter Huurne 2014-08-18 23:40:10 +02:00
parent e827b2f18c
commit 482bd09d78

View File

@ -334,7 +334,12 @@ bool LinkApp::targetExists()
}
bool LinkApp::save() {
if (!edited) return true;
// TODO: In theory a non-editable Link wouldn't have 'edited' set, but
// currently 'edited' is set on more than a few non-edits, so this
// extra check helps prevent write attempts that will never succeed.
// Maybe we shouldn't have an 'edited' flag at all and make the
// outside world fully responsible for calling save() when needed.
if (!editable || !edited) return true;
std::ostringstream out;
if (!isOpk()) {