Commit 15392b30 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark Committed by Kurt Hindenburg
Browse files

Clean up images when clearing screen/history

parent 54f657e6
......@@ -120,7 +120,7 @@ public:
/** Returns the history store used by this emulation. See setHistory() */
const HistoryType &history() const;
/** Clears the history scroll. */
void clearHistory();
virtual void clearHistory();
/**
* Copies the output history from @p startLine to @p endLine
......
......@@ -1798,7 +1798,7 @@ void Screen::setScroll(const HistoryType &t, bool copyPreviousScroll)
auto oldHistory = std::move(_history);
t.scroll(_history);
}
_graphicsPlacements.clear();
#ifdef HAVE_MALLOC_H
#ifdef Q_OS_LINUX
#ifdef __GNUC__
......
......@@ -91,6 +91,13 @@ void Vt102Emulation::clearEntireScreen()
bufferedUpdate();
}
void Vt102Emulation::clearHistory()
{
_graphicsImages.clear();
Emulation::clearHistory();
}
void Vt102Emulation::reset(bool softReset)
{
// Save the current codec so we can set it later.
......
......@@ -83,6 +83,7 @@ public Q_SLOTS:
void sendKeyEvent(QKeyEvent *) override;
void sendMouseEvent(int buttons, int column, int line, int eventType) override;
void focusChanged(bool focused) override;
void clearHistory() override;
protected:
// reimplemented from Emulation
......
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