Bug 315660 - Close Inactive Views does not close all other views
Summary: Close Inactive Views does not close all other views
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-22 23:34 UTC by Christoph Feck
Modified: 2013-02-25 20:21 UTC (History)
1 user (show)

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 Christoph Feck 2013-02-22 23:34:18 UTC
Trying today's master after commit for bug 297619:

To reproduce:
- start Kate
- Split View > Split Horizontal
- in the upper view: Split Horizontal again
- in the lower view: Split Horizontal again
(now you have 4 views)
- Split View > Close Inactive Views

Actual result:
- closes two of the views, leaving two open

Expected result:
- closes three views, leaving only one open
Comment 1 Christoph Feck 2013-02-22 23:39:54 UTC
Clarification:

(now you have 4 views)
- click into third view to activate it
- Split View > Close Inactive Views

It works when you had the fourth view activated
Comment 2 Dominik Haumann 2013-02-23 08:32:15 UTC
Maybe this is a bug of the activeViewSpace() then? I'd need to look into the code further.
Comment 3 Fabian 2013-02-23 09:20:27 UTC
Hm, that seems indeed like a bug in activeViewSpace(). When I cache the return value of it, the bug doesn't seem to occur.
Comment 4 Fabian 2013-02-23 17:46:14 UTC
Git commit 2e38699a04fc804b7619d0c48b6bea48b2dfa40f by Fabian Kosmale.
Committed on 23/02/2013 at 13:47.
Pushed by fabiank into branch 'master'.

Works around what is probably a bug in activeViewSpace
Anyway, it might be a good idea to use a variable instead of calling the
function each time in the loop

M  +1    -1    kate/app/kateappcommands.cpp
M  +2    -1    kate/app/kateviewmanager.cpp

http://commits.kde.org/kate/2e38699a04fc804b7619d0c48b6bea48b2dfa40f
Comment 5 Dominik Haumann 2013-02-25 20:08:36 UTC
Ok, it works now, I guess. So I close this issue.

Still, Fabian and Christoph: I could not reproduce that several view spaces remain open.
However, this is a bug I'd like to have properly fixed. As you said you can reproduce, can you please debug the application and find out where the active view spaces is set wrongly?
That would be really awesome, since I remember we once had another bug hit by this.
Comment 6 Fabian 2013-02-25 20:21:58 UTC
Dominik, Christoph: I've created a new bug report for it https://bugs.kde.org/show_bug.cgi?id=315767 . Let's see if we can find the root cause.