Index: branches/mbutscher/work/lib/pwiki/DocPages.py
===================================================================
--- branches/mbutscher/work/lib/pwiki/DocPages.py (revision 234)
+++ branches/mbutscher/work/lib/pwiki/DocPages.py (revision 245)
@@ -1518,6 +1518,9 @@
             threadstop=DUMBTHREADSTOP):
 
+        # Step 1: Refresh attributes
         self.refreshAttributesFromPageAst(pageAst, threadstop=threadstop)
 
+        # Some attributes control format details so check if attribute
+        # refresh changed the details
         formatDetails2 = self.getFormatDetails()
         if not formatDetails.isEquivTo(formatDetails2):
@@ -1526,6 +1529,13 @@
             return False
 
-        return self.refreshMainDbCacheFromPageAst(pageAst, fireEvent=fireEvent,
+        # Step 2: Refresh todos, link structure ...
+        self.refreshMainDbCacheFromPageAst(pageAst, fireEvent=fireEvent,
                 threadstop=threadstop)
+
+        # Step 3: Update index search data
+        self.putIntoSearchIndex(threadstop=threadstop)
+        
+        return True
+
 
 
@@ -1740,4 +1750,6 @@
         """
         with self.textOperationLock:
+            threadstop.testRunning()
+
             if not self.getWikiDocument().isSearchIndexEnabled():
                 return True  # Or false?
@@ -1816,5 +1828,5 @@
             if step == -1:
                 self._refreshMetaData(pageAst, formatDetails, threadstop=threadstop)
-    
+
                 with self.textOperationLock:
                     if not liveTextPlaceHold is self.liveTextPlaceHold:
