Don't copy combined invisible names

This commit is contained in:
miruka 2019-09-01 15:44:06 -04:00
parent 9936a7e2ee
commit 85aaf7bcce
4 changed files with 14 additions and 3 deletions

View File

@ -28,6 +28,7 @@
- Don't strip user spacing in html - Don't strip user spacing in html
- Do something when access token is invalid - Do something when access token is invalid
- Don't store states in delegates
- Message position after daybreak delegate (fixed by commit 57b1313 ?) - Message position after daybreak delegate (fixed by commit 57b1313 ?)
- [hr not working](https://bugreports.qt.io/browse/QTBUG-74342) - [hr not working](https://bugreports.qt.io/browse/QTBUG-74342)
- Terrible performance using `QT_QPA_PLATFORM=wayland-egl`, must use `xcb` - Terrible performance using `QT_QPA_PLATFORM=wayland-egl`, must use `xcb`
@ -40,9 +41,6 @@
- Room header descriptions: styled text - Room header descriptions: styled text
- Message selection - Message selection
- ctrl-c
- Copy appending copies?
- Don't copy combined message names
- Copy link - Copy link
- Make scroll wheel usable - Make scroll wheel usable
- Copy to X11 selection - Copy to X11 selection

View File

@ -23,9 +23,18 @@ TextEdit {
// in container.joinedSelection. If it's a decimal number, if gets one \n. // in container.joinedSelection. If it's a decimal number, if gets one \n.
property real index property real index
property HSelectableLabelContainer container property HSelectableLabelContainer container
property bool selectable: true
function updateSelection() { function updateSelection() {
if (! selectable && label.selectedText) {
label.deselect()
updateContainerSelectedTexts()
return
}
if (! selectable) return
if (! container.reversed && if (! container.reversed &&
container.selectionStart <= container.selectionEnd || container.selectionStart <= container.selectionEnd ||

View File

@ -53,6 +53,7 @@ Row {
width: parent.width width: parent.width
visible: ! hideNameLine visible: ! hideNameLine
container: selectableLabelContainer container: selectableLabelContainer
selectable: ! unselectableNameLine
// This is +0.1 and content is +0 instead of the opposite, // This is +0.1 and content is +0 instead of the opposite,
// because the eventList is reversed // because the eventList is reversed

View File

@ -35,6 +35,9 @@ Column {
onRight || onRight ||
combine combine
readonly property bool unselectableNameLine:
hideNameLine && ! (onRight && ! combine)
width: eventList.width width: eventList.width
topPadding: topPadding: