Bug 499777

Summary: `Window.showView` does not appear to work
Product: [Applications] krita Reporter: Sabrina Jewson <sejewson>
Component: ScriptingAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version First Reported In: 5.2.9   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Sabrina Jewson 2025-02-10 20:43:19 UTC
SUMMARY

Window.showView does not do anything.

STEPS TO REPRODUCE
1. Open two documents in Krita, open the scripter and paste this code in:
    w=Krita.instance().activeWindow()
    print(len(w.views())) # prints 2
    w.showView(w.views()[0])
2. Press “run” and nothing happens. Replace the 0 with a 1 and try again – still nothing happens.

EXPECTED BEHAVIOUR

The current tab is changed.

SOFTWARE/OS VERSIONS
Qt Version: 5.15.11
Comment 1 Sabrina Jewson 2025-02-10 20:44:52 UTC
This is low-priority because a helpful user on the forum (https://krita-artists.org/t/possible-bug-showview-does-not-appear-to-work/114827) pointed out that View.setVisible still works for the same effect.
Comment 2 Dmitry Kazakov 2025-04-11 16:22:02 UTC
Git commit 8dd2bdbb4a7644aaf61562ce7a61c797afe674f3 by Dmitry Kazakov, on behalf of Scott Petrovic.
Committed on 11/04/2025 at 16:20.
Pushed by dkazakov into branch 'master'.

M  +5    -4    libs/libkis/Window.cpp
M  +1    -1    libs/libkis/Window.h

https://invent.kde.org/graphics/krita/-/commit/8dd2bdbb4a7644aaf61562ce7a61c797afe674f3