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) {
if (jsonResult) {
var result = JSON.parse(jsonResult);
var url = result.textInput;
var url = result.textInput.trim();
var shapeType;
switch (result.comboBox) {
case SHAPE_TYPE_SIMPLE_HULL:

View file

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

View file

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