forked from qt-creator/qt-creator
TextEditor: Add action to clear a selection
Change-Id: I5467a5ef30413418d65a9ac22f1c22d58ee0ee60 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -239,6 +239,12 @@ void MultiTextCursor::removeSelectedText()
|
||||
mergeCursors();
|
||||
}
|
||||
|
||||
void MultiTextCursor::clearSelection()
|
||||
{
|
||||
for (auto cursor = m_cursorList.begin(); cursor != m_cursorList.end(); ++cursor)
|
||||
cursor->clearSelection();
|
||||
}
|
||||
|
||||
static void insertAndSelect(QTextCursor &cursor, const QString &text, bool selectNewText)
|
||||
{
|
||||
if (selectNewText) {
|
||||
|
||||
Reference in New Issue
Block a user