<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>408113</bug_id>
          
          <creation_ts>2019-05-30 13:08:53 +0000</creation_ts>
          <short_desc>Document::guidesVisible and guidesLocked code reversed typo</short_desc>
          <delta_ts>2019-06-04 15:21:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>General</component>
          <version>4.1.7</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Microsoft Windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dan">dan.mclaughlin</reporter>
          <assigned_to name="vanyossi">ghevan</assigned_to>
          <cc>ghevan</cc>
          
          <cf_commitlink>https://invent.kde.org/kde/krita/commit/02ed4ce29a9897f4f93a23eaa9f588b258f9f0e7</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1859580</commentid>
    <comment_count>0</comment_count>
    <who name="Dan">dan.mclaughlin</who>
    <bug_when>2019-05-30 13:08:53 +0000</bug_when>
    <thetext>SUMMARY
Discovered while Python scripting, Document::guidesVisible and guidesLocked properties code appears to be switched. 

https://api.kde.org/extragear-api/graphics-apidocs/krita/libs/libkis/html/Document_8cpp_source.html#l00800

  795 bool Document::guidesVisible() const
  796 {
  797     return d-&gt;document-&gt;guidesConfig().lockGuides();
  798 }
  799 
  800 bool Document::guidesLocked() const
  801 {
  802     return d-&gt;document-&gt;guidesConfig().showGuides();
  803 }

Using these functions in Python (v4.1.7) verifies they are reversed. You can see guidesVisible is using the &apos;lockGuides()&apos; property and vice-versa. 

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1859623</commentid>
    <comment_count>1</comment_count>
    <who name="vanyossi">ghevan</who>
    <bug_when>2019-05-30 15:39:31 +0000</bug_when>
    <thetext>Git commit eecd08a946c62b5b3b6b8501df5823090167b72a by Ivan Yossi.
Committed on 30/05/2019 at 15:38.
Pushed by ivany into branch &apos;master&apos;.

Fix reversed python api guides lock/show states

M  +2    -2    libs/libkis/Document.cpp

https://invent.kde.org/kde/krita/commit/eecd08a946c62b5b3b6b8501df5823090167b72a</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1859625</commentid>
    <comment_count>2</comment_count>
    <who name="vanyossi">ghevan</who>
    <bug_when>2019-05-30 15:40:24 +0000</bug_when>
    <thetext>Thanks for the heads up dan :D, It is fixed now</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1860655</commentid>
    <comment_count>3</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2019-06-04 15:21:29 +0000</bug_when>
    <thetext>Git commit 02ed4ce29a9897f4f93a23eaa9f588b258f9f0e7 by Boudewijn Rempt, on behalf of Ivan Yossi.
Committed on 04/06/2019 at 15:18.
Pushed by rempt into branch &apos;krita/4.2&apos;.

Fix reversed python api guides lock/show states

M  +2    -2    libs/libkis/Document.cpp

https://invent.kde.org/kde/krita/commit/02ed4ce29a9897f4f93a23eaa9f588b258f9f0e7</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>