14812.patch.txt
1 |
diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp |
---|---|
2 |
index 7ce2a15..d8c4dff 100644 |
3 |
--- a/src/app/qgisapp.cpp |
4 |
+++ b/src/app/qgisapp.cpp |
5 |
@@ -1604,14 +1604,19 @@ void QgisApp::showStyleManagerV2() |
6 |
void QgisApp::writeAnnotationItemsToProject( QDomDocument& doc ) |
7 |
{ |
8 |
QList<QgsAnnotationItem*> items = annotationItems(); |
9 |
- QList<QgsAnnotationItem*>::const_iterator itemIt = items.constBegin(); |
10 |
- for ( ; itemIt != items.constEnd(); ++itemIt ) |
11 |
+ QgsAnnotationItem* item; |
12 |
+ QListIterator<QgsAnnotationItem*> i( items ); |
13 |
+ // save lowermost annotation (at end of list) first |
14 |
+ i.toBack(); |
15 |
+ while ( i.hasPrevious() ) |
16 |
{ |
17 |
- if ( ! *itemIt ) |
18 |
+ item = i.previous(); |
19 |
+ |
20 |
+ if ( ! item ) |
21 |
{ |
22 |
continue; |
23 |
} |
24 |
- ( *itemIt )->writeXML( doc ); |
25 |
+ item->writeXML( doc ); |
26 |
} |
27 |
} |
28 |
|