[Uml-devel] kdesdk/umbrello/umbrello

Brian Thomas thomas at mail630.gsfc.nasa.gov
Wed Oct 22 09:12:05 UTC 2003


CVS commit by thomas: 

bug fix: insertTextBlock broken. Not properly descending into child hierarchicalTextBlocks to check for an insert


  M +1 -1      codedocument.cpp   1.11
  M +7 -2      hierarchicalcodeblock.cpp   1.10


--- kdesdk/umbrello/umbrello/codedocument.cpp  #1.10:1.11
@@ -289,5 +289,5 @@ bool CodeDocument::insertTextBlock(TextB
 
         QString tag = existingBlock->getTag();
-        if(!m_textBlockTagMap->contains(tag))
+        if(!findTextBlockByTag(tag, true))
                 return false;
 

--- kdesdk/umbrello/umbrello/hierarchicalcodeblock.cpp  #1.9:1.10
@@ -154,5 +154,11 @@ bool HierarchicalCodeBlock::insertTextBl
 
         QString tag = existingBlock->getTag();
-        if(!m_textBlockTagMap->contains(tag))
+        // FIX: just do a quick check if the parent DOCUMENT has this.
+        // IF it does, then the lack of an index will force us into
+        // a search of any child hierarchical codeblocks we may have
+        // Its not efficent, but works. I dont think speed is a problem
+        // right now for the current implementation, but in the future
+        // when code import/roundtripping is done, it *may* be. -b.t.
+        if(!getParentDocument()->findTextBlockByTag(tag, true))
                 return false;
 






More information about the umbrello-devel mailing list