QmlDesigner: remove DesignDocument::goIntoSelectedComponent()

This function is highly confusing as a member of DesignDocument
and the logic can be implemented directly in the ShortcutManager.

Change-Id: Id722dcb71b542b4780614c9f895f06150ccb67ca
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This commit is contained in:
Thomas Hartmann
2013-08-05 16:07:31 +02:00
parent e5c323e83a
commit b108f72bc7
3 changed files with 6 additions and 19 deletions

View File

@@ -304,8 +304,12 @@ void ShortCutManager::redoAvailable(bool isAvailable)
void ShortCutManager::goIntoComponent()
{
if (currentDesignDocument())
currentDesignDocument()->goIntoSelectedComponent();
if (currentDesignDocument()
&& currentDesignDocument()->currentModel()
&& currentDesignDocument()->rewriterView()
&& currentDesignDocument()->rewriterView()->hasSingleSelectedModelNode()) {
DocumentManager::goIntoComponent(currentDesignDocument()->rewriterView()->singleSelectedModelNode());
}
}
} // namespace QmlDesigner