[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source

Caolán McNamara caolanm at redhat.com
Fri Jun 8 19:33:53 UTC 2018


 vcl/source/app/salvtables.cxx |    3 +++
 vcl/source/window/builder.cxx |    3 +++
 2 files changed, 6 insertions(+)

New commits:
commit e15f7b3f670a5146516beeb05269227c0dde75cf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 8 11:32:38 2018 +0100

    sync tristate/inconsistent feature
    
    Change-Id: Id1107f4fb1f51f377ad546f9b673f9037fee1538
    Reviewed-on: https://gerrit.libreoffice.org/55469
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 590d0acefa8d..8e9689c7c2c1 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1130,6 +1130,7 @@ public:
     virtual void set_active(bool active) override
     {
         m_bBlockNotify = true;
+        m_xCheckButton->EnableTriState(false);
         m_xCheckButton->Check(active);
         m_bBlockNotify = false;
     }
@@ -1142,6 +1143,7 @@ public:
     virtual void set_inconsistent(bool inconsistent) override
     {
         m_bBlockNotify = true;
+        m_xCheckButton->EnableTriState(true);
         m_xCheckButton->SetState(inconsistent ? TRISTATE_INDET : TRISTATE_FALSE);
         m_bBlockNotify = false;
     }
@@ -1161,6 +1163,7 @@ IMPL_LINK_NOARG(SalInstanceCheckButton, ToggleHdl, CheckBox&, void)
 {
     if (m_bBlockNotify)
         return;
+    m_xCheckButton->EnableTriState(false);
     signal_toggled();
 }
 
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 72f41efad638..8ba726cfdfed 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1550,7 +1550,10 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
         else
             xCheckBox = VclPtr<CheckBox>::Create(pParent, nBits);
         if (bIsTriState)
+        {
+            xCheckBox->EnableTriState(true);
             xCheckBox->SetState(TRISTATE_INDET);
+        }
         xCheckBox->SetImageAlign(ImageAlign::Left); //default to left
 
         xWindow = xCheckBox;


More information about the Libreoffice-commits mailing list