Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit d3e0c3b9 authored by Ralf Habacker's avatar Ralf Habacker

Fix 'Documentation window content assignment issue'.

We should select the correct object pointer in relation to the
currently used documentation window content type for updating.
Otherwise the order of object/scene/widget selection wrongly
determines which object is updated.

BUG: 342398
parent 739d8c06
......@@ -233,16 +233,18 @@ void DocWindow::updateDocumentation(bool clear, bool startup)
// we don't do this on startup/load of a xmi file, because every time
// modified is set, we get another undo/redo backup point
if (isModified()) {
if (m_pUMLObject) {
if (m_Showing == st_UMLObject && m_pUMLObject) {
m_pUMLObject->setDoc(m_docTE->toPlainText());
} else if(m_pUMLScene) {
} else if(m_Showing == st_UMLScene && m_pUMLScene) {
m_pUMLScene->setDocumentation(m_docTE->toPlainText());
} else if (m_pUMLWidget) {
} else if (m_Showing == st_UMLWidget && m_pUMLWidget) {
m_pUMLWidget->setDocumentation(m_docTE->toPlainText());
} else if (m_pAssocWidget) {
} else if (m_Showing == st_Association && m_pAssocWidget) {
m_pAssocWidget->setDocumentation(m_docTE->toPlainText());
} else {
} else if (m_Showing == st_Project) {
m_pUMLDoc->setDocumentation(m_docTE->toPlainText());
} else {
uError() << "could not update documentation because of unkown type and object combination";
}
// now do the setModified call
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment