diff options
Diffstat (limited to 'src/plugins/serialterminal/serialoutputpane.cpp')
-rw-r--r-- | src/plugins/serialterminal/serialoutputpane.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/serialterminal/serialoutputpane.cpp b/src/plugins/serialterminal/serialoutputpane.cpp index e9dfb50ce7..0ef4a3544a 100644 --- a/src/plugins/serialterminal/serialoutputpane.cpp +++ b/src/plugins/serialterminal/serialoutputpane.cpp @@ -291,7 +291,9 @@ void SerialOutputPane::createNewOutputWindow(SerialControl *rc) connect(rc, &SerialControl::finished, [this, rc]() { - rc->outputFormatter()->flush(); + const int tabIndex = indexOf(rc); + if (tabIndex != -1) + m_serialControlTabs[tabIndex].window->flush(); if (isCurrent(rc)) enableButtons(rc, false); }); @@ -299,11 +301,9 @@ void SerialOutputPane::createNewOutputWindow(SerialControl *rc) connect(rc, &SerialControl::appendMessageRequested, this, &SerialOutputPane::appendMessage); - Utils::OutputFormatter *formatter = rc->outputFormatter(); - // Create new static int counter = 0; - Core::Id contextId = Core::Id(Constants::C_SERIAL_OUTPUT).withSuffix(counter++); + Utils::Id contextId = Utils::Id(Constants::C_SERIAL_OUTPUT).withSuffix(counter++); Core::Context context(contextId); auto ow = new Core::OutputWindow(context, QString(), m_tabWidget); using TextEditor::TextEditorSettings; @@ -315,7 +315,6 @@ void SerialOutputPane::createNewOutputWindow(SerialControl *rc) this, fontSettingsChanged); fontSettingsChanged(); ow->setWindowTitle(tr("Serial Terminal Window")); - ow->setFormatter(formatter); // TODO: wordwrap, maxLineCount, zoom/wheelZoom (add to settings) auto controlTab = SerialControlTab(rc, ow); |