Commit e9af824f authored by Nikita Baryshnikov's avatar Nikita Baryshnikov

QmlDesigner: avoid uninitialized warning

Change-Id: I88d3da3030b5a2b71b3d807ba9482e2e0e656b37
Reviewed-by: default avatarTim Jenssen <tim.jenssen@theqtcompany.com>
parent 224acfb0
......@@ -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())));
}
}
}
}
......
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