diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-05-06 06:11:22 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-05-06 06:11:22 (GMT) |
commit | 95db707e2fe96eb7b6e5edcbd2850149b16e23b2 (patch) | |
tree | 59e044ff384d0a0f90acc138bbc53a7bd706a141 /src/declarative/fx/qfxpathview.cpp | |
parent | 4c4fbc3fb731a4195d66f761ed4a58da5db00aa3 (diff) | |
download | Qt-95db707e2fe96eb7b6e5edcbd2850149b16e23b2.zip Qt-95db707e2fe96eb7b6e5edcbd2850149b16e23b2.tar.gz Qt-95db707e2fe96eb7b6e5edcbd2850149b16e23b2.tar.bz2 |
Enable updating of XmlListModel from Qml.
Made the fetch() method a slot so it will be accessible from QML.
Diffstat (limited to 'src/declarative/fx/qfxpathview.cpp')
-rw-r--r-- | src/declarative/fx/qfxpathview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index 810a359..ca6379f 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -699,6 +699,12 @@ void QFxPathView::itemsRemoved(int modelIndex, int count) d->regenerate(); } + if (d->model->count() == 0) { + d->currentIndex == -1; + d->moveOffset.setValue(0); + return; + } + // make sure the current item is still at the snap position if (d->currentIndex >= d->model->count()) d->currentIndex = d->model->count() - 1; |