diff --git a/lib/libqof/qof/qofutil.c b/lib/libqof/qof/qofutil.c index 87b7995d66..96dc1f35a1 100644 --- a/lib/libqof/qof/qofutil.c +++ b/lib/libqof/qof/qofutil.c @@ -254,7 +254,7 @@ gboolean qof_commit_edit(QofInstance *inst) inst->editlevel--; if (0 < inst->editlevel) return FALSE; - if ((-1 == inst->editlevel) && inst->dirty) + if ((0 == inst->editlevel) && inst->dirty) { be = qof_book_get_backend (inst->book); if (be && qof_backend_commit_exists(be)) { diff --git a/lib/libqof/qof/qofutil.h b/lib/libqof/qof/qofutil.h index c3a4274dae..f9e612e51a 100644 --- a/lib/libqof/qof/qofutil.h +++ b/lib/libqof/qof/qofutil.h @@ -354,7 +354,7 @@ gboolean qof_begin_edit(QofInstance *inst); /* The pricedb suffers from delayed update... */ \ /* This may be setting a bad precedent for other types, I fear. */ \ /* Other types probably really should handle begin like this. */ \ - if ((-1 == (inst)->editlevel) && (inst)->dirty) \ + if ((0 == (inst)->editlevel) && (inst)->dirty) \ { \ QofBackend * be; \ be = qof_book_get_backend ((inst)->book); \