[Uml-devel] kdesdk/umbrello/umbrello
Brian Thomas
thomas at mail630.gsfc.nasa.gov
Thu Dec 4 09:51:01 UTC 2003
CVS commit by thomas:
bug fix/tweak : empty text passed to the addOrUpdate* methods shouldnt be ignored. Fixed
M +17 -13 codegenobjectwithtextblocks.cpp 1.10
--- kdesdk/umbrello/umbrello/codegenobjectwithtextblocks.cpp #1.9:1.10
@@ -273,10 +273,9 @@ CodeComment * CodeGenObjectWithTextBlock
}
- if(!text.isEmpty())
- {
codeComment->setText(text);
if(createdCodeComment)
+ if(!text.isEmpty())
codeComment->setWriteOutText(true); // set to visible, if we created
- } else if (createdCodeComment)
+ else
codeComment->setWriteOutText(false); // set to not visible, if we created
@@ -317,14 +316,19 @@ CodeBlockWithComments * CodeGenObjectWit
{
- if(!text.isEmpty())
codeBlock->setText(text);
-
- if(!ctext.isEmpty())
- {
codeBlock->getComment()->setText(ctext);
+
+ // if we created this from scratch, make it write out only when the block isnt empty
if (createdCodeBlock)
+ {
+ if(!ctext.isEmpty())
codeBlock->getComment()->setWriteOutText(true);
- } else if (createdCodeBlock)
+ else
codeBlock->getComment()->setWriteOutText(false);
+ if(!text.isEmpty())
+ codeBlock->setWriteOutText(true);
+ else
+ codeBlock->setWriteOutText(false);
+ }
codeBlock->setOverallIndentationLevel(indentLevel);
More information about the umbrello-devel
mailing list