This commit is contained in:
DavidXanatos 2024-11-21 20:51:36 +01:00
parent e96400b66d
commit 60a611c871
2 changed files with 8 additions and 6 deletions

View File

@ -415,6 +415,12 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& pBox, const QStri
pTree->setAlternatingRowColors(true);
}
m_pCodeEdit = new CCodeEdit(new CIniHighlighter);
ui.txtIniSection->parentWidget()->layout()->replaceWidget(ui.txtIniSection, m_pCodeEdit);
delete ui.txtIniSection;
ui.txtIniSection = NULL;
connect(m_pCodeEdit, SIGNAL(textChanged()), this, SLOT(OnIniChanged()));
CreateDebug();
if (m_Template)
@ -577,11 +583,6 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& pBox, const QStri
connect(ui.tabs, SIGNAL(currentChanged(int)), this, SLOT(OnTab()));
// edit
m_pCodeEdit = new CCodeEdit(new CIniHighlighter);
ui.txtIniSection->parentWidget()->layout()->replaceWidget(ui.txtIniSection, m_pCodeEdit);
ui.txtIniSection->deleteLater();
connect(m_pCodeEdit, SIGNAL(textChanged()), this, SLOT(OnIniChanged()));
ApplyIniEditFont();
connect(ui.btnEditIni, SIGNAL(clicked(bool)), this, SLOT(OnEditIni()));

View File

@ -603,7 +603,8 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
m_pCodeEdit = new CCodeEdit(new CIniHighlighter);
ui.txtIniSection->parentWidget()->layout()->replaceWidget(ui.txtIniSection, m_pCodeEdit);
ui.txtIniSection->deleteLater();
delete ui.txtIniSection;
ui.txtIniSection = NULL;
connect(m_pCodeEdit, SIGNAL(textChanged()), this, SLOT(OnIniChanged()));
ApplyIniEditFont();