mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 17:03:43 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into shadowControlsOffZvork
This commit is contained in:
commit
b519ebd6f1
8 changed files with 42 additions and 48 deletions
|
@ -75,8 +75,6 @@ Item {
|
|||
// TODO: Fix this unlikely bug
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
passphraseField.error = false;
|
||||
passphraseField.focus = true;
|
||||
sendSignalToParent({method: 'disableHmdPreview'});
|
||||
} else {
|
||||
sendSignalToParent({method: 'maybeEnableHmdPreview'});
|
||||
|
@ -206,6 +204,14 @@ Item {
|
|||
placeholderText: "passphrase";
|
||||
activeFocusOnPress: true;
|
||||
activeFocusOnTab: true;
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
error = false;
|
||||
focus = true;
|
||||
forceActiveFocus();
|
||||
}
|
||||
}
|
||||
|
||||
onFocusChanged: {
|
||||
root.keyboardRaised = focus;
|
||||
|
|
|
@ -923,7 +923,7 @@ Item {
|
|||
anchors.leftMargin: 20;
|
||||
anchors.right: parent.right;
|
||||
anchors.rightMargin: 20;
|
||||
height: 140;
|
||||
height: 95;
|
||||
|
||||
FontLoader { id: firaSansSemiBold; source: "../../../../../fonts/FiraSans-SemiBold.ttf"; }
|
||||
TextArea {
|
||||
|
@ -947,8 +947,14 @@ Item {
|
|||
wrapMode: TextEdit.Wrap;
|
||||
activeFocusOnPress: true;
|
||||
activeFocusOnTab: true;
|
||||
// Workaround for no max length on TextAreas
|
||||
onTextChanged: {
|
||||
// Don't allow tabs or newlines
|
||||
if ((/[\n\r\t]/g).test(text)) {
|
||||
var cursor = cursorPosition;
|
||||
text = text.replace(/[\n\r\t]/g, '');
|
||||
cursorPosition = cursor-1;
|
||||
}
|
||||
// Workaround for no max length on TextAreas
|
||||
if (text.length > maximumLength) {
|
||||
var cursor = cursorPosition;
|
||||
text = previousText;
|
||||
|
|
|
@ -131,7 +131,7 @@ Rectangle {
|
|||
spacing: 5
|
||||
|
||||
anchors.horizontalCenter: column3.horizontalCenter
|
||||
anchors.horizontalCenterOffset: -20
|
||||
anchors.horizontalCenterOffset: 0
|
||||
|
||||
Button {
|
||||
id: button1
|
||||
|
|
|
@ -130,6 +130,7 @@ Item {
|
|||
flickableDirection: Flickable.AutoFlickIfNeeded
|
||||
keyNavigationEnabled: false
|
||||
highlightFollowsCurrentItem: false
|
||||
interactive: false
|
||||
|
||||
property int previousGridIndex: -1
|
||||
|
||||
|
|
|
@ -434,9 +434,13 @@ void Rig::setJointRotation(int index, bool valid, const glm::quat& rotation, flo
|
|||
|
||||
bool Rig::getJointPositionInWorldFrame(int jointIndex, glm::vec3& position, glm::vec3 translation, glm::quat rotation) const {
|
||||
bool success { false };
|
||||
if (QThread::currentThread() == thread()) {
|
||||
glm::vec3 originalPosition = position;
|
||||
bool onOwnerThread = (QThread::currentThread() == thread());
|
||||
glm::vec3 poseSetTrans;
|
||||
if (onOwnerThread) {
|
||||
if (isIndexValid(jointIndex)) {
|
||||
position = (rotation * _internalPoseSet._absolutePoses[jointIndex].trans()) + translation;
|
||||
poseSetTrans = _internalPoseSet._absolutePoses[jointIndex].trans();
|
||||
position = (rotation * poseSetTrans) + translation;
|
||||
success = true;
|
||||
} else {
|
||||
success = false;
|
||||
|
@ -444,7 +448,8 @@ bool Rig::getJointPositionInWorldFrame(int jointIndex, glm::vec3& position, glm:
|
|||
} else {
|
||||
QReadLocker readLock(&_externalPoseSetLock);
|
||||
if (jointIndex >= 0 && jointIndex < (int)_externalPoseSet._absolutePoses.size()) {
|
||||
position = (rotation * _externalPoseSet._absolutePoses[jointIndex].trans()) + translation;
|
||||
poseSetTrans = _externalPoseSet._absolutePoses[jointIndex].trans();
|
||||
position = (rotation * poseSetTrans) + translation;
|
||||
success = true;
|
||||
} else {
|
||||
success = false;
|
||||
|
@ -452,7 +457,14 @@ bool Rig::getJointPositionInWorldFrame(int jointIndex, glm::vec3& position, glm:
|
|||
}
|
||||
|
||||
if (isNaN(position)) {
|
||||
qCWarning(animation) << "Rig::getJointPositionInWorldFrame produces NaN";
|
||||
qCWarning(animation) << "Rig::getJointPositionInWorldFrame produced NaN."
|
||||
<< " is owner thread = " << onOwnerThread
|
||||
<< " position = " << originalPosition
|
||||
<< " translation = " << translation
|
||||
<< " rotation = " << rotation
|
||||
<< " poseSetTrans = " << poseSetTrans
|
||||
<< " success = " << success
|
||||
<< " jointIndex = " << jointIndex;
|
||||
success = false;
|
||||
position = glm::vec3(0.0f);
|
||||
}
|
||||
|
|
|
@ -331,9 +331,9 @@ void OffscreenSurface::finishQmlLoad(QQmlComponent* qmlComponent,
|
|||
qmlComponent->deleteLater();
|
||||
|
||||
onItemCreated(qmlContext, newItem);
|
||||
connect(newItem, SIGNAL(sendToScript(QVariant)), this, SIGNAL(fromQml(QVariant)));
|
||||
|
||||
if (!rootCreated) {
|
||||
connect(newItem, SIGNAL(sendToScript(QVariant)), this, SIGNAL(fromQml(QVariant)));
|
||||
onRootCreated();
|
||||
emit rootItemCreated(newItem);
|
||||
// Call this callback after rootitem is set, otherwise VrMenu wont work
|
||||
|
|
|
@ -305,7 +305,6 @@ void OffscreenQmlSurface::onItemCreated(QQmlContext* qmlContext, QQuickItem* new
|
|||
qmlContext->setContextProperty("eventBridgeWrapper", new EventBridgeWrapper(eventBridge, qmlContext));
|
||||
}
|
||||
|
||||
connect(newItem, SIGNAL(sendToScript(QVariant)), this, SIGNAL(fromQml(QVariant)));
|
||||
}
|
||||
|
||||
void OffscreenQmlSurface::onRootCreated() {
|
||||
|
|
|
@ -509,15 +509,6 @@ function unbindAllInputs() {
|
|||
}
|
||||
}
|
||||
|
||||
function clearSelection() {
|
||||
if (document.selection && document.selection.empty) {
|
||||
document.selection.empty();
|
||||
} else if (window.getSelection) {
|
||||
var sel = window.getSelection();
|
||||
sel.removeAllRanges();
|
||||
}
|
||||
}
|
||||
|
||||
function showParentMaterialNameBox(number, elNumber, elString) {
|
||||
if (number) {
|
||||
$('#property-parent-material-id-number-container').show();
|
||||
|
@ -831,8 +822,10 @@ function loaded() {
|
|||
if (lastEntityID !== '"' + properties.id + '"' && lastEntityID !== null && editor !== null) {
|
||||
saveJSONUserData(true);
|
||||
}
|
||||
// the event bridge and json parsing handle our avatar id string differently.
|
||||
|
||||
var doSelectElement = lastEntityID === '"' + properties.id + '"';
|
||||
|
||||
// the event bridge and json parsing handle our avatar id string differently.
|
||||
lastEntityID = '"' + properties.id + '"';
|
||||
elID.value = properties.id;
|
||||
|
||||
|
@ -1214,12 +1207,10 @@ function loaded() {
|
|||
}
|
||||
|
||||
var activeElement = document.activeElement;
|
||||
|
||||
if (typeof activeElement.select !== "undefined") {
|
||||
if (doSelectElement && typeof activeElement.select !== "undefined") {
|
||||
activeElement.select();
|
||||
}
|
||||
}
|
||||
clearSelection();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1787,34 +1778,13 @@ function loaded() {
|
|||
};
|
||||
|
||||
// For input and textarea elements, select all of the text on focus
|
||||
// WebKit-based browsers, such as is used with QWebView, have a quirk
|
||||
// where the mouseup event comes after the focus event, causing the
|
||||
// text to be deselected immediately after selecting all of the text.
|
||||
// To make this work we block the first mouseup event after the elements
|
||||
// received focus. If we block all mouseup events the user will not
|
||||
// be able to click within the selected text.
|
||||
// We also check to see if the value has changed to make sure we aren't
|
||||
// blocking a mouse-up event when clicking on an input spinner.
|
||||
var els = document.querySelectorAll("input, textarea");
|
||||
for (var i = 0; i < els.length; i++) {
|
||||
var clicked = false;
|
||||
var originalText;
|
||||
// TODO FIXME: (JSHint) Functions declared within loops referencing
|
||||
// an outer scoped variable may lead to confusing semantics.
|
||||
els[i].onfocus = function(e) {
|
||||
originalText = this.value;
|
||||
this.select();
|
||||
clicked = false;
|
||||
};
|
||||
// TODO FIXME: (JSHint) Functions declared within loops referencing
|
||||
// an outer scoped variable may lead to confusing semantics.
|
||||
els[i].onmouseup = function(e) {
|
||||
if (!clicked && originalText === this.value) {
|
||||
e.preventDefault();
|
||||
}
|
||||
clicked = true;
|
||||
els[i].onfocus = function (e) {
|
||||
e.target.select();
|
||||
};
|
||||
}
|
||||
|
||||
bindAllNonJSONEditorElements();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue