forked from qt-creator/qt-creator
File > New: Bring existing dialog to foreground
Task-number: QTCREATORBUG-16932 Change-Id: I1a90ab01825b5cd2f439395cbdf4400075943dc4 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -513,11 +513,12 @@ void MainWindow::registerDefaultActions()
|
||||
cmd->setDefaultKeySequence(QKeySequence::New);
|
||||
mfile->addAction(cmd, Constants::G_FILE_NEW);
|
||||
connect(m_newAction, &QAction::triggered, this, [this]() {
|
||||
ICore::showNewItemDialog(tr("New File or Project", "Title of dialog"),
|
||||
IWizardFactory::allWizardFactories(), QString());
|
||||
});
|
||||
connect(ICore::instance(), &ICore::newItemDialogRunningChanged, m_newAction, [this]() {
|
||||
m_newAction->setEnabled(!ICore::isNewItemDialogRunning());
|
||||
if (!ICore::isNewItemDialogRunning()) {
|
||||
ICore::showNewItemDialog(tr("New File or Project", "Title of dialog"),
|
||||
IWizardFactory::allWizardFactories(), QString());
|
||||
} else {
|
||||
ICore::raiseWindow(ICore::newItemDialog());
|
||||
}
|
||||
});
|
||||
|
||||
// Open Action
|
||||
|
||||
Reference in New Issue
Block a user