QLineEdit: Create a separate undo entry for each middle-click paste
Previously, a sequence of middle-click pastes produced just one undo item to undo/redo all of the pastes at once. The new code seems to be the intended way to paste the selection anyway. Change-Id: Ifc2e9714628da9e394053ff8c34709578656f54d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
2e1ad4335c
commit
90749ecf09
@ -1582,7 +1582,7 @@ void QLineEdit::mouseReleaseEvent(QMouseEvent* e)
|
||||
d->control->copy(QClipboard::Selection);
|
||||
} else if (!d->control->isReadOnly() && e->button() == Qt::MidButton) {
|
||||
deselect();
|
||||
insert(QApplication::clipboard()->text(QClipboard::Selection));
|
||||
d->control->paste(QClipboard::Selection);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user