UI: ANSI colors, code fix suggestion
Co-authored-by: Megamouse <studienricky89@googlemail.com>
This commit is contained in:
@@ -295,11 +295,11 @@ void log_frame::CreateAndConnectActions()
|
|||||||
m_gui_settings->SetValue(gui::l_ansi_code, checked);
|
m_gui_settings->SetValue(gui::l_ansi_code, checked);
|
||||||
m_ansi_tty = checked;
|
m_ansi_tty = checked;
|
||||||
|
|
||||||
if (m_ansi_tty)
|
if (m_ansi_tty && !m_tty_ansi_highlighter)
|
||||||
{
|
{
|
||||||
m_tty_ansi_highlighter = new AnsiHighlighter(m_tty->document());
|
m_tty_ansi_highlighter = new AnsiHighlighter(m_tty->document());
|
||||||
}
|
}
|
||||||
else
|
else if (!m_ansi_tty && m_tty_ansi_highlighter)
|
||||||
{
|
{
|
||||||
m_tty_ansi_highlighter->deleteLater();
|
m_tty_ansi_highlighter->deleteLater();
|
||||||
m_tty_ansi_highlighter = nullptr;
|
m_tty_ansi_highlighter = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user