forked from qt-creator/qt-creator
Switching to the output mode now always gives focus to the output mode.
Annoying
This commit is contained in:
@@ -63,6 +63,7 @@
|
|||||||
#include "editormanager/ieditorfactory.h"
|
#include "editormanager/ieditorfactory.h"
|
||||||
#include "baseview.h"
|
#include "baseview.h"
|
||||||
#include "basefilewizard.h"
|
#include "basefilewizard.h"
|
||||||
|
#include "ioutputpane.h"
|
||||||
|
|
||||||
#include <coreplugin/findplaceholder.h>
|
#include <coreplugin/findplaceholder.h>
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
@@ -302,6 +303,9 @@ bool MainWindow::init(QString *errorMessage)
|
|||||||
outputModeWidget->layout()->addWidget(new Core::FindToolBarPlaceHolder(m_outputMode));
|
outputModeWidget->layout()->addWidget(new Core::FindToolBarPlaceHolder(m_outputMode));
|
||||||
outputModeWidget->setFocusProxy(oph);
|
outputModeWidget->setFocusProxy(oph);
|
||||||
|
|
||||||
|
connect(m_modeManager, SIGNAL(currentModeChanged(Core::IMode*)),
|
||||||
|
this, SLOT(modeChanged(Core::IMode*)), Qt::QueuedConnection);
|
||||||
|
|
||||||
m_outputMode->setContext(m_globalContext);
|
m_outputMode->setContext(m_globalContext);
|
||||||
pm->addObject(m_outputMode);
|
pm->addObject(m_outputMode);
|
||||||
pm->addObject(m_generalSettings);
|
pm->addObject(m_generalSettings);
|
||||||
@@ -317,6 +321,16 @@ bool MainWindow::init(QString *errorMessage)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::modeChanged(Core::IMode *mode)
|
||||||
|
{
|
||||||
|
if (mode == m_outputMode) {
|
||||||
|
int idx = OutputPaneManager::instance()->m_widgetComboBox->itemData(OutputPaneManager::instance()->m_widgetComboBox->currentIndex()).toInt();
|
||||||
|
IOutputPane *out = OutputPaneManager::instance()->m_pageMap.value(idx);
|
||||||
|
if (out && out->canFocus())
|
||||||
|
out->setFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::extensionsInitialized()
|
void MainWindow::extensionsInitialized()
|
||||||
{
|
{
|
||||||
m_editorManager->init();
|
m_editorManager->init();
|
||||||
|
@@ -64,6 +64,7 @@ class UniqueIDManager;
|
|||||||
class VariableManager;
|
class VariableManager;
|
||||||
class VCSManager;
|
class VCSManager;
|
||||||
class ViewManagerInterface;
|
class ViewManagerInterface;
|
||||||
|
class IMode;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -153,6 +154,7 @@ private slots:
|
|||||||
void updateFocusWidget(QWidget *old, QWidget *now);
|
void updateFocusWidget(QWidget *old, QWidget *now);
|
||||||
void setSidebarVisible(bool visible);
|
void setSidebarVisible(bool visible);
|
||||||
void destroyVersionDialog();
|
void destroyVersionDialog();
|
||||||
|
void modeChanged(Core::IMode *mode);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateContextObject(IContext *context);
|
void updateContextObject(IContext *context);
|
||||||
|
Reference in New Issue
Block a user