Merge pull request #8788 from ctrlaltdavid/fix-asset-browser

QA READY: Fix Asset Browser add-to-world
This commit is contained in:
Chris Collins 2016-10-12 13:02:35 -07:00 committed by GitHub
commit 58d4eb7452
3 changed files with 10 additions and 2 deletions

View file

@ -184,7 +184,7 @@ ScrollingWindow {
prompt.selected.connect(function (jsonResult) { prompt.selected.connect(function (jsonResult) {
if (jsonResult) { if (jsonResult) {
var result = JSON.parse(jsonResult); var result = JSON.parse(jsonResult);
var url = result.textInput; var url = result.textInput.trim();
var shapeType; var shapeType;
switch (result.comboBox) { switch (result.comboBox) {
case SHAPE_TYPE_SIMPLE_HULL: case SHAPE_TYPE_SIMPLE_HULL:

View file

@ -32,6 +32,8 @@ FocusScope {
readonly property ComboBox control: comboBox readonly property ComboBox control: comboBox
signal accepted();
implicitHeight: comboBox.height; implicitHeight: comboBox.height;
focus: true focus: true
@ -134,6 +136,7 @@ FocusScope {
function hideList() { function hideList() {
popup.visible = false; popup.visible = false;
scrollView.hoverEnabled = false; scrollView.hoverEnabled = false;
root.accepted();
} }
FocusScope { FocusScope {

View file

@ -211,6 +211,7 @@ ModalWindow {
left: parent.left; left: parent.left;
bottom: parent.bottom; bottom: parent.bottom;
leftMargin: 6; // Magic number to align with warning icon leftMargin: 6; // Magic number to align with warning icon
bottomMargin: 6;
} }
} }
@ -224,7 +225,10 @@ ModalWindow {
bottom: parent.bottom; bottom: parent.bottom;
} }
model: root.comboBox ? root.comboBox.items : []; model: root.comboBox ? root.comboBox.items : [];
onCurrentTextChanged: updateCheckbox(); onAccepted: {
updateCheckbox();
focus = true;
}
} }
} }
@ -336,6 +340,7 @@ ModalWindow {
Component.onCompleted: { Component.onCompleted: {
updateIcon(); updateIcon();
updateCheckbox();
d.resize(); d.resize();
textField.forceActiveFocus(); textField.forceActiveFocus();
} }