Ouch, wrong actual parameter order! Allways save settings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5564 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -287,13 +287,13 @@ PrinterSettings::Update(BNode* node, BMessage* msg)
|
|||||||
if (ps.Validate(msg) != B_OK) {
|
if (ps.Validate(msg) != B_OK) {
|
||||||
BMessage settings;
|
BMessage settings;
|
||||||
// check for previously saved settings
|
// check for previously saved settings
|
||||||
if (ps.ReadSettings(&settings) != B_OK) {
|
if (ps.ReadSettings(&settings) != B_OK || ps.Validate(&settings) != B_OK) {
|
||||||
// if there were none, then create a default set...
|
// if there were none, then create a default set...
|
||||||
ps.GetDefaults(&settings);
|
ps.GetDefaults(&settings);
|
||||||
// ...and save them
|
|
||||||
ps.WriteSettings(&settings);
|
|
||||||
}
|
}
|
||||||
AddFields(&settings, msg, false);
|
AddFields(msg, &settings, false);
|
||||||
}
|
}
|
||||||
|
// ...and save them
|
||||||
|
ps.WriteSettings(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user