Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Fix buttons not working in the svg text editor
Luna Lovecraft6bde961ba2b6
diff --git a/plugins/tools/svgtexttool/SvgTextEditor.cpp b/plugins/tools/svgtexttool/SvgTextEditor.cppindex 145aab7dc4..b717793742 100644--- a/plugins/tools/svgtexttool/SvgTextEditor.cpp+++ b/plugins/tools/svgtexttool/SvgTextEditor.cpp@@ -88,6 +88,9 @@ SvgTextEditor::SvgTextEditor(QWidget *parent, Qt::WindowFlags flags)connect(m_textEditorWidget.buttons, SIGNAL(rejected()), this, SLOT(slotCloseEditor()));connect(m_textEditorWidget.buttons, SIGNAL(clicked(QAbstractButton*)), this, SLOT(dialogButtonClicked(QAbstractButton*)));+ connect(m_textEditorWidget.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));+ tabChanged(m_textEditorWidget.tabWidget->currentIndex());+KConfigGroup cg(KSharedConfig::openConfig(), "SvgTextTool");actionCollection()->setConfigGroup("SvgTextTool");actionCollection()->setComponentName("svgtexttool");@@ -485,3 +488,12 @@ bool SvgTextEditor::eventFilter(QObject *const watched, QEvent *const event)return false;return KXmlGuiWindow::eventFilter(watched, event);}++void SvgTextEditor::tabChanged(int index)+{+ if (index == 0) {+ m_currentEditor = m_textEditorWidget.svgTextEdit;+ } else {+ m_currentEditor = m_textEditorWidget.svgStylesEdit;+ }+}diff --git a/plugins/tools/svgtexttool/SvgTextEditor.h b/plugins/tools/svgtexttool/SvgTextEditor.hindex 19f843353b..40889b9d52 100644--- a/plugins/tools/svgtexttool/SvgTextEditor.h+++ b/plugins/tools/svgtexttool/SvgTextEditor.h@@ -61,6 +61,7 @@ private Q_SLOTS:void setModified(bool modified);void dialogButtonClicked(QAbstractButton *button);+ void tabChanged(int index);Q_SIGNALS:void textUpdated(KoSvgTextShape *shape, const QString &svg, const QString &defs);void textEditorClosed();