Added clearing of selection on changing of FlatLabel selectability.
This commit is contained in:
parent
dea62df69b
commit
73ec29fa06
1 changed files with 6 additions and 2 deletions
|
|
@ -263,8 +263,12 @@ void FlatLabel::setMarkedText(const TextWithEntities &textWithEntities) {
|
|||
}
|
||||
|
||||
void FlatLabel::setSelectable(bool selectable) {
|
||||
_selectable = selectable;
|
||||
setMouseTracking(_selectable || _text.hasLinks());
|
||||
if (_selectable != selectable) {
|
||||
_selection = { 0, 0 };
|
||||
_savedSelection = { 0, 0 };
|
||||
_selectable = selectable;
|
||||
setMouseTracking(_selectable || _text.hasLinks());
|
||||
}
|
||||
}
|
||||
|
||||
void FlatLabel::setDoubleClickSelectsParagraph(bool doubleClickSelectsParagraph) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue