diff options
-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 |