forked from qt-creator/qt-creator
QmlDesigner: avoid uninitialized warning
Change-Id: I88d3da3030b5a2b71b3d807ba9482e2e0e656b37 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -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())));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user