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()) {
|
if (hasSelectedModelNodes()) {
|
||||||
int handlingRank = 0;
|
int handlingRank = 0;
|
||||||
AbstractCustomTool *selectedCustomTool;
|
AbstractCustomTool *selectedCustomTool = 0;
|
||||||
|
|
||||||
ModelNode selectedModelNode = selectedModelNodes().first();
|
ModelNode selectedModelNode = selectedModelNodes().first();
|
||||||
|
|
||||||
@@ -424,12 +424,14 @@ void FormEditorView::changeToCustomTool()
|
|||||||
if (handlingRank > 0) {
|
if (handlingRank > 0) {
|
||||||
m_scene->updateAllFormEditorItems();
|
m_scene->updateAllFormEditorItems();
|
||||||
m_currentTool->clear();
|
m_currentTool->clear();
|
||||||
|
if (selectedCustomTool) {
|
||||||
m_currentTool = selectedCustomTool;
|
m_currentTool = selectedCustomTool;
|
||||||
m_currentTool->clear();
|
m_currentTool->clear();
|
||||||
m_currentTool->setItems(scene()->itemsForQmlItemNodes(toQmlItemNodeList(selectedModelNodes())));
|
m_currentTool->setItems(scene()->itemsForQmlItemNodes(toQmlItemNodeList(selectedModelNodes())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FormEditorView::changeToCustomTool(AbstractCustomTool *customTool)
|
void FormEditorView::changeToCustomTool(AbstractCustomTool *customTool)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user