diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-19 15:35:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-20 09:56:15 +0200 |
commit | da9a539999fc8ae47a78542ce646005f3a9be868 (patch) | |
tree | 955f1361b5379da8bf24ab23e4cabdc3dc260745 /vcl | |
parent | 3f73733f7df6393be773e66e445eb0a86e9a9377 (diff) |
use can-focus for TB_TABSTOP|WB_NOTABSTOP, not editable
Change-Id: I56e60b98151c5dfcf8148ddafb6224bed734d039
Reviewed-on: https://gerrit.libreoffice.org/60773
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/edit.cxx | 11 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 4 |
2 files changed, 4 insertions, 11 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index b40b3df51c6c..3688f9c3374d 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -191,16 +191,7 @@ bool Edit::set_property(const OString &rKey, const OUString &rValue) } else if (rKey == "editable") { - bool bReadOnly = !toBool(rValue); - SetReadOnly(bReadOnly); - //disable tab to traverse into readonly editables - WinBits nBits = GetStyle(); - nBits &= ~(WB_TABSTOP|WB_NOTABSTOP); - if (!bReadOnly) - nBits |= WB_TABSTOP; - else - nBits |= WB_NOTABSTOP; - SetStyle(nBits); + SetReadOnly(!toBool(rValue)); } else if (rKey == "visibility") { diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 829f7e3f5b27..bce47fc40a00 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1553,9 +1553,11 @@ bool Window::set_property(const OString &rKey, const OUString &rValue) else if (rKey == "can-focus") { WinBits nBits = GetStyle(); - nBits &= ~WB_TABSTOP; + nBits &= ~(WB_TABSTOP|WB_NOTABSTOP); if (toBool(rValue)) nBits |= WB_TABSTOP; + else + nBits |= WB_NOTABSTOP; SetStyle(nBits); } else |