diff options
-rw-r--r-- | dw/oofawarewidget_iterator.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/dw/oofawarewidget_iterator.cc b/dw/oofawarewidget_iterator.cc index 119222c9..83446d7f 100644 --- a/dw/oofawarewidget_iterator.cc +++ b/dw/oofawarewidget_iterator.cc @@ -146,11 +146,12 @@ bool OOFAwareWidget::OOFAwareWidgetIterator::next () content.type = Content::END; r = false; cancel = true; - } else + } else { index = 0; + getPart (sectionIndex, index, &content); + } } - getPart (sectionIndex, index, &content); } while (!cancel && (content.type & getMask()) == 0); } @@ -199,11 +200,11 @@ bool OOFAwareWidget::OOFAwareWidgetIterator::prev () content.type = Content::START; r = false; cancel = true; - } else + } else { index = numParts (sectionIndex) - 1; - } - - getPart (sectionIndex, index, &content); + getPart (sectionIndex, index, &content); + } + } } while (!cancel && (content.type & getMask()) == 0); } |