Bug 499777 - `Window.showView` does not appear to work
Summary: `Window.showView` does not appear to work
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Scripting (show other bugs)
Version: 5.2.9
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-10 20:43 UTC by Sabrina Jewson
Modified: 2025-04-11 16:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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