summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Hindenburg <kurt.hindenburg@gmail.com>2011-02-05 20:58:42 (GMT)
committerKurt Hindenburg <kurt.hindenburg@gmail.com>2011-02-05 20:58:42 (GMT)
commit18dd5bd012dae86b118c7b7a132866c0c7781297 (patch)
treef8d3392d18fde5f14f34001b827a05e63965e4f9
parentc19655a98316148cb7bf11d753781e8359d00921 (diff)
Fix issue where the context menu popup no longer appeared after closing
a tab. Backport to 4.6 branch. CCBUG: 185466
-rw-r--r--src/MainWindow.cpp2
-rw-r--r--src/MainWindow.h2
-rw-r--r--src/ViewManager.cpp4
-rw-r--r--src/ViewManager.h6
4 files changed, 13 insertions, 1 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 49f1bb4..39727fc 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -86,6 +86,8 @@ MainWindow::MainWindow()
connect( _viewManager , SIGNAL(empty()) , this , SLOT(close()) );
connect( _viewManager , SIGNAL(activeViewChanged(SessionController*)) , this ,
SLOT(activeViewChanged(SessionController*)) );
+ connect( _viewManager , SIGNAL(unplugController(SessionController*)) , this ,
+ SLOT(disconnectController(SessionController*)) );
connect( _viewManager , SIGNAL(viewPropertiesChanged(const QList<ViewProperties*>&)) ,
bookmarkHandler() , SLOT(setViews(const QList<ViewProperties*>&)) );
diff --git a/src/MainWindow.h b/src/MainWindow.h
index 98ca2a0..2e4276d 100644
--- a/src/MainWindow.h
+++ b/src/MainWindow.h
@@ -161,6 +161,7 @@ class MainWindow : public KXmlGuiWindow
void showShortcutsDialog();
void newFromProfile(Profile::Ptr profile);
void activeViewChanged(SessionController* controller);
+ void disconnectController(SessionController* controller);
void activeViewTitleChanged(ViewProperties*);
void sessionListChanged(const QList<QAction*>& actions);
@@ -181,7 +182,6 @@ class MainWindow : public KXmlGuiWindow
void setupActions();
void setupWidgets();
QString activeSessionDir() const;
- void disconnectController(SessionController* controller);
// sets the active shortcuts of actions in 'dest' to the shortcuts of actions
// with the same name in 'source' (see KAction::ActiveShortcut)
diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp
index 3c5db04..a846a38 100644
--- a/src/ViewManager.cpp
+++ b/src/ViewManager.cpp
@@ -377,6 +377,10 @@ void ViewManager::sessionFinished()
}
}
+ // This is needed to remove this controller from factory() in
+ // order to prevent BUG: 185466 - disappearing menu popup
+ if (_pluggedController)
+ emit unplugController(_pluggedController);
}
void ViewManager::focusActiveView()
diff --git a/src/ViewManager.h b/src/ViewManager.h
index 3a1a796..bf17b4d 100644
--- a/src/ViewManager.h
+++ b/src/ViewManager.h
@@ -175,6 +175,12 @@ signals:
*/
void activeViewChanged(SessionController* controller);
+ /**
+ * Emitted when the current session needs unplugged from factory().
+ * @param controller The controller associated with the active view
+ */
+ void unplugController(SessionController* controller);
+
/**
* Emitted when the list of view properties ( as returned by viewProperties() ) changes.
* This occurs when views are added to or removed from the active container, or