mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 18:15:54 +02:00
Avoid rewriting non-editable app settings
This is a workaround, see TODO in code for details.
This commit is contained in:
parent
e827b2f18c
commit
482bd09d78
@ -334,7 +334,12 @@ bool LinkApp::targetExists()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool LinkApp::save() {
|
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;
|
std::ostringstream out;
|
||||||
if (!isOpk()) {
|
if (!isOpk()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user