| Summary: | 'close icon' closes wrong tab in split view | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Matthew Woehlke <mwoehlke.floss> |
| Component: | general | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Matthew Woehlke
2006-11-11 01:24:11 UTC
What UI mode are you in? (Settings->Configure KDevelop->UI Mode) It might be relevant. Tested with IDEAL mode, KDE & KDevelop from svn, it works fine. If I'm on the C++ file, it closes the C++, if I'm inside the other part of the split view (the .h file), it closes that one. Simplified IDEAL, using KDevelop 3.3.93 svn synced yesterday, I can still reproduce. C++ Support settings (Navigation) are: 'enable split'=yes 'auto sync'=yes, Orientation=Horizontal (this didn't seem to make a difference), and in Context Menu, 'Switch ...'=yes, 'Show Go To ...'=no, 'Show type ...'=yes. Turning off 'auto sync' didn't help, and I wouldn't expect any of the context menu stuff to have any effect. Can't reproduce in RC2. Hmm, just checked again in SVN (as of last week, I think, but more recently than RC2); no change. Anything suggestions on tracking this down? Might it be a problem in KATE? Yes, you're right. It still exists. SVN commit 615262 by dagerbo:
Handle closing of multibuffers
BUG: 137179
M +11 -1 simplemainwindow.cpp
--- branches/kdevelop/3.4/src/simplemainwindow.cpp #615261:615262
@@ -54,6 +54,7 @@
#include "toplevel.h"
#include "projectmanager.h"
#include "editorproxy.h"
+#include "multibuffer.h"
SimpleMainWindow::SimpleMainWindow(QWidget* parent, const char *name)
:DMainWindow(parent, name)
@@ -847,7 +848,16 @@
QWidget *widget = EditorProxy::getInstance()->topWidgetForPart(part);
if (widget && widget == w)
{
- PartController::getInstance()->closePart(part);
+ // weirdness beyond weirdness.. sometimes the active view is an embedded splitter with two files
+ // so we check if the widget is a multibuffer, in which case we let it decide what part to close
+ if (MultiBuffer * mb = dynamic_cast<MultiBuffer*>( widget ) )
+ {
+ PartController::getInstance()->closePart( mb->activeBuffer() );
+ }
+ else
+ {
+ PartController::getInstance()->closePart(part);
+ }
return;
}
++it;
Confirming that that fixed it. Thanks, Jens! |