mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:03:53 +02:00
Fixes
This commit is contained in:
parent
d376630bde
commit
29a9ae28e9
2 changed files with 7 additions and 15 deletions
|
@ -44,7 +44,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
onSecurityImageResult: {
|
||||
securityImage.source = imageID ? gridModel.get(imageID - 1).sourcePath : "";
|
||||
securityImage.source = securityImageSelection.getImagePathFromImageID(imageID);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,9 +52,6 @@ Rectangle {
|
|||
id: securityImageSelection;
|
||||
referrerURL: inventoryRoot.referrerURL;
|
||||
}
|
||||
SecurityImageModel {
|
||||
id: gridModel;
|
||||
}
|
||||
|
||||
//
|
||||
// TITLE BAR START
|
||||
|
|
|
@ -26,7 +26,6 @@ Rectangle {
|
|||
id: securityImageSelectionRoot;
|
||||
property string referrerURL: "";
|
||||
property bool isManuallyChangingSecurityImage: false;
|
||||
property int imageEnumValue: 0;
|
||||
anchors.fill: parent;
|
||||
// Style
|
||||
color: hifi.colors.baseGray;
|
||||
|
@ -39,13 +38,12 @@ Rectangle {
|
|||
if (!isManuallyChangingSecurityImage) {
|
||||
securityImageSelectionRoot.visible = (imageID == 0);
|
||||
}
|
||||
if (imageID !== 0) {
|
||||
if (imageID > 0) {
|
||||
for (var itr = 0; itr < gridModel.count; itr++) {
|
||||
var thisValue = gridModel.get(itr).securityImageEnumValue;
|
||||
if (thisValue === imageID) {
|
||||
securityImageSelectionRoot.imageEnumValue = thisValue;
|
||||
securityImageGrid.currentIndex = itr;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -182,16 +180,9 @@ Rectangle {
|
|||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
hoverEnabled: enabled;
|
||||
onClicked: {
|
||||
securityImageGrid.currentIndex = index;
|
||||
}
|
||||
onEntered: {
|
||||
//thisItemId.color = hifi.colors.blueHighlight;
|
||||
}
|
||||
onExited: {
|
||||
//thisItemId.color = hifi.colors.blueAccent;
|
||||
}
|
||||
}
|
||||
}
|
||||
highlight: Rectangle {
|
||||
|
@ -268,6 +259,10 @@ Rectangle {
|
|||
// FUNCTION DEFINITIONS START
|
||||
//
|
||||
signal sendToScript(var message);
|
||||
|
||||
function getImagePathFromImageID(imageID) {
|
||||
return (imageID ? gridModel.get(imageID - 1).sourcePath : "");
|
||||
}
|
||||
//
|
||||
// FUNCTION DEFINITIONS END
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue