Bug 408113

Summary: Document::guidesVisible and guidesLocked code reversed typo
Product: [Applications] krita Reporter: Dan <dan.mclaughlin>
Component: GeneralAssignee: vanyossi <ghevan>
Status: RESOLVED FIXED    
Severity: normal CC: ghevan
Priority: NOR    
Version: 4.1.7   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dan 2019-05-30 13:08:53 UTC
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->document->guidesConfig().lockGuides();
  798 }
  799 
  800 bool Document::guidesLocked() const
  801 {
  802     return d->document->guidesConfig().showGuides();
  803 }

Using these functions in Python (v4.1.7) verifies they are reversed. You can see guidesVisible is using the 'lockGuides()' 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
Comment 1 vanyossi 2019-05-30 15:39:31 UTC
Git commit eecd08a946c62b5b3b6b8501df5823090167b72a by Ivan Yossi.
Committed on 30/05/2019 at 15:38.
Pushed by ivany into branch 'master'.

Fix reversed python api guides lock/show states

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

https://invent.kde.org/kde/krita/commit/eecd08a946c62b5b3b6b8501df5823090167b72a
Comment 2 vanyossi 2019-05-30 15:40:24 UTC
Thanks for the heads up dan :D, It is fixed now
Comment 3 Halla Rempt 2019-06-04 15:21:29 UTC
Git commit 02ed4ce29a9897f4f93a23eaa9f588b258f9f0e7 by Boudewijn Rempt, on behalf of Ivan Yossi.
Committed on 04/06/2019 at 15:18.
Pushed by rempt into branch 'krita/4.2'.

Fix reversed python api guides lock/show states

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

https://invent.kde.org/kde/krita/commit/02ed4ce29a9897f4f93a23eaa9f588b258f9f0e7