Commit a204f65a authored by Awakening's avatar Awakening Committed by Halla Rempt
Browse files

Don't switch to the same editor tab again

If we do, we're converting the contents of the other tab to the current tab,
and reverting all changes we've made (even if we saved).

(cherry picked from commit bf636b2d)
parent 4d7669ae
......@@ -425,7 +425,8 @@ void SvgTextEditor::switchTextEditorTab(bool convertData)
disconnect(m_currentEditor->document(), SIGNAL(modificationChanged(bool)), this, SLOT(setModified(bool)));
if (isRichTextEditorActive()) {
// do not switch to the same tab again, otherwise we're losing current changes
if (m_currentEditor != m_textEditorWidget.richTextEdit && isRichTextEditorActive()) {
//first, make buttons checkable
......@@ -444,7 +445,7 @@ void SvgTextEditor::switchTextEditorTab(bool convertData)
m_currentEditor = m_textEditorWidget.richTextEdit;
} else if (isSvgSourceEditorActive()) {
} else if (m_currentEditor != m_textEditorWidget.svgTextEdit && isSvgSourceEditorActive()) {
//first, make buttons uncheckable
Supports Markdown
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