forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user