Commit 2b3db205 authored by dt's avatar dt Committed by Robert Loehning
Browse files

Fix crash on clicking in compile output

parent 911e268b
...@@ -355,6 +355,7 @@ OutputWindow::OutputWindow(QWidget *parent) ...@@ -355,6 +355,7 @@ OutputWindow::OutputWindow(QWidget *parent)
: QPlainTextEdit(parent) : QPlainTextEdit(parent)
, m_enforceNewline(false) , m_enforceNewline(false)
, m_scrollToBottom(false) , m_scrollToBottom(false)
, m_formatter(0)
{ {
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
//setCenterOnScroll(false); //setCenterOnScroll(false);
...@@ -558,17 +559,20 @@ void OutputWindow::enableUndoRedo() ...@@ -558,17 +559,20 @@ void OutputWindow::enableUndoRedo()
void OutputWindow::mousePressEvent(QMouseEvent *e) void OutputWindow::mousePressEvent(QMouseEvent *e)
{ {
QPlainTextEdit::mousePressEvent(e); QPlainTextEdit::mousePressEvent(e);
if (m_formatter)
m_formatter->mousePressEvent(e); m_formatter->mousePressEvent(e);
} }
void OutputWindow::mouseReleaseEvent(QMouseEvent *e) void OutputWindow::mouseReleaseEvent(QMouseEvent *e)
{ {
QPlainTextEdit::mouseReleaseEvent(e); QPlainTextEdit::mouseReleaseEvent(e);
if (m_formatter)
m_formatter->mouseReleaseEvent(e); m_formatter->mouseReleaseEvent(e);
} }
void OutputWindow::mouseMoveEvent(QMouseEvent *e) void OutputWindow::mouseMoveEvent(QMouseEvent *e)
{ {
QPlainTextEdit::mouseMoveEvent(e); QPlainTextEdit::mouseMoveEvent(e);
if (m_formatter)
m_formatter->mouseMoveEvent(e); m_formatter->mouseMoveEvent(e);
} }
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