summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <[email protected]>2015-06-27 21:02:58 +0200
committerRalf Habacker <[email protected]>2015-06-27 21:02:58 +0200
commitcf8f1a1d70fcbf06ee6748eb9c7f83fc992e63d9 (patch)
treea929b33ce556ccd0b875eb5447d45a35b21e4e0a
parent54768d4e0ae739f6763a449a402ecc41ae12d411 (diff)
Fix bug in ClassifierWidget not saving/loading "showdocumentation" attribute from/into xmi file.
I assumed it uses the OptionState instance as other widgets do.
-rw-r--r--umbrello/widgets/classifierwidget.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/umbrello/widgets/classifierwidget.cpp b/umbrello/widgets/classifierwidget.cpp
index b122755..32be859 100644
--- a/umbrello/widgets/classifierwidget.cpp
+++ b/umbrello/widgets/classifierwidget.cpp
@@ -1215,6 +1215,9 @@ bool ClassifierWidget::loadFromXMI(QDomElement & qElement)
QString showpackage = qElement.attribute(QLatin1String("showpackage"), QLatin1String("0"));
QString showscope = qElement.attribute(QLatin1String("showscope"), QLatin1String("0"));
QString drawascircle = qElement.attribute(QLatin1String("drawascircle"), QLatin1String("0"));
+#ifdef ENABLE_WIDGET_SHOW_DOC
+ QString showDocumentation = qElement.attribute(QLatin1String("showdocumentation"), QLatin1String("0"));
+#endif
setVisualPropertyCmd(ShowAttributes, (bool)showatts.toInt());
setVisualPropertyCmd(ShowOperations, (bool)showops.toInt());
@@ -1222,6 +1225,9 @@ bool ClassifierWidget::loadFromXMI(QDomElement & qElement)
setVisualPropertyCmd(ShowPackage, (bool)showpackage.toInt());
setVisualPropertyCmd(ShowVisibility, (bool)showscope.toInt());
setVisualPropertyCmd(DrawAsCircle, (bool)drawascircle.toInt());
+#ifdef ENABLE_WIDGET_SHOW_DOC
+ setVisualPropertyCmd(ShowDocumentation, (bool)showDocumentation.toInt());
+#endif
m_attributeSignature = Uml::SignatureType::fromInt(showattsigs.toInt());
m_operationSignature = Uml::SignatureType::fromInt(showopsigs.toInt());
@@ -1276,6 +1282,9 @@ void ClassifierWidget::saveToXMI(QDomDocument & qDoc, QDomElement & qElement)
conceptElement.setAttribute(QLatin1String("showscope"), visualProperty(ShowVisibility));
conceptElement.setAttribute(QLatin1String("showattributes"), visualProperty(ShowAttributes));
conceptElement.setAttribute(QLatin1String("showattsigs"), m_attributeSignature);
+#ifdef ENABLE_WIDGET_SHOW_DOC
+ conceptElement.setAttribute(QLatin1String("showdocumentation"),visualProperty(ShowDocumentation));
+#endif
if (umlc && (umlc->isInterface() || umlc->isAbstract())) {
conceptElement.setAttribute(QLatin1String("drawascircle"), visualProperty(DrawAsCircle));
if (visualProperty(DrawAsCircle) && m_pInterfaceName) {