diff --git a/src/Emulation.cpp b/src/Emulation.cpp index 056cb4ed..baa06f62 100644 --- a/src/Emulation.cpp +++ b/src/Emulation.cpp @@ -92,7 +92,7 @@ void Emulation::checkScreenInUse() void Emulation::checkSelectedText() { - bool isEmpty = _currentScreen->isSelectionEmpty(); + bool isEmpty = !_currentScreen->hasSelection(); Q_EMIT selectionChanged(isEmpty); } diff --git a/src/Screen.cpp b/src/Screen.cpp index 01509385..30de5b98 100644 --- a/src/Screen.cpp +++ b/src/Screen.cpp @@ -1425,15 +1425,6 @@ bool Screen::isSelected(const int x, const int y) const return pos >= _selTopLeft && pos <= _selBottomRight && columnInSelection; } -bool Screen::isSelectionEmpty() const -{ - if (!isSelectionValid()) { - return true; - } - - return _selTopLeft == _selBottomRight; -} - QString Screen::selectedText(const DecodingOptions options) const { if (!isSelectionValid()) { diff --git a/src/Screen.h b/src/Screen.h index b4d9b7e7..3737bad5 100644 --- a/src/Screen.h +++ b/src/Screen.h @@ -467,7 +467,6 @@ public: */ bool isSelected(const int x, const int y) const; - bool isSelectionEmpty() const; /** * Convenience method. Returns the currently selected text. * @param options See Screen::DecodingOptions