Activating Locator when already in the locator window didn't work.

For example when you typed Ctrl+l and find that you don't want to use
the goto line filter after all.
This commit is contained in:
con
2009-06-22 10:53:21 +02:00
parent 2f7b3e1257
commit 3a851daf2c
2 changed files with 4 additions and 3 deletions

View File

@@ -129,7 +129,7 @@ bool QuickOpenPlugin::initialize(const QStringList &, QString *)
void QuickOpenPlugin::openQuickOpen() void QuickOpenPlugin::openQuickOpen()
{ {
m_quickOpenToolWindow->setFocus(); m_quickOpenToolWindow->show("");
} }
void QuickOpenPlugin::extensionsInitialized() void QuickOpenPlugin::extensionsInitialized()

View File

@@ -438,7 +438,8 @@ void QuickOpenToolWindow::acceptCurrentEntry()
void QuickOpenToolWindow::show(const QString &text, int selectionStart, int selectionLength) void QuickOpenToolWindow::show(const QString &text, int selectionStart, int selectionLength)
{ {
m_fileLineEdit->hideHintText(); m_fileLineEdit->hideHintText();
m_fileLineEdit->setText(text); if (!text.isEmpty())
m_fileLineEdit->setText(text);
if (!m_fileLineEdit->hasFocus()) if (!m_fileLineEdit->hasFocus())
m_fileLineEdit->setFocus(); m_fileLineEdit->setFocus();
else else
@@ -447,7 +448,7 @@ void QuickOpenToolWindow::show(const QString &text, int selectionStart, int sele
if (selectionStart >= 0) if (selectionStart >= 0)
m_fileLineEdit->setSelection(selectionStart, selectionLength); m_fileLineEdit->setSelection(selectionStart, selectionLength);
else else
m_fileLineEdit->deselect(); m_fileLineEdit->selectAll();
} }
void QuickOpenToolWindow::filterSelected() void QuickOpenToolWindow::filterSelected()