QmlDesigner: avoid uninitialized warning

Change-Id: I88d3da3030b5a2b71b3d807ba9482e2e0e656b37
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Nikita Baryshnikov
2015-06-11 18:48:34 +03:00
parent 224acfb0aa
commit e9af824fe0

View File

@@ -409,7 +409,7 @@ void FormEditorView::changeToCustomTool()
{
if (hasSelectedModelNodes()) {
int handlingRank = 0;
AbstractCustomTool *selectedCustomTool;
AbstractCustomTool *selectedCustomTool = 0;
ModelNode selectedModelNode = selectedModelNodes().first();
@@ -424,9 +424,11 @@ void FormEditorView::changeToCustomTool()
if (handlingRank > 0) {
m_scene->updateAllFormEditorItems();
m_currentTool->clear();
m_currentTool = selectedCustomTool;
m_currentTool->clear();
m_currentTool->setItems(scene()->itemsForQmlItemNodes(toQmlItemNodeList(selectedModelNodes())));
if (selectedCustomTool) {
m_currentTool = selectedCustomTool;
m_currentTool->clear();
m_currentTool->setItems(scene()->itemsForQmlItemNodes(toQmlItemNodeList(selectedModelNodes())));
}
}
}
}