Commit 5699ca96 authored by Tobias Hunger's avatar Tobias Hunger

Wizards: Block reloading of wizards while NewDialog is visible

Change-Id: Iaaca36ce540104a9ccf1d2b354785463d711aacb
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 7c9e8f87
......@@ -318,6 +318,8 @@ void IWizardFactory::destroyFeatureProvider()
void IWizardFactory::clearWizardFactories()
{
QTC_ASSERT(!ICore::isNewItemDialogRunning(), return);
foreach (IWizardFactory *factory, s_allFactories)
ActionManager::unregisterAction(factory->m_action, actionId(factory));
......@@ -360,4 +362,6 @@ void IWizardFactory::initialize()
ActionManager::registerAction(resetAction, "Wizard.Factory.Reset");
connect(resetAction, &QAction::triggered, &IWizardFactory::clearWizardFactories);
connect(ICore::instance(), &ICore::newItemDialogRunningChanged, resetAction,
[resetAction]() { resetAction->setEnabled(!ICore::isNewItemDialogRunning()); });
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment