mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 16:36:54 +02:00
commit
4940615a83
5 changed files with 33 additions and 14 deletions
|
@ -3932,6 +3932,7 @@ void Application::setPreviousScriptLocation(const QString& previousScriptLocatio
|
||||||
_previousScriptLocation = previousScriptLocation;
|
_previousScriptLocation = previousScriptLocation;
|
||||||
QMutexLocker locker(&_settingsMutex);
|
QMutexLocker locker(&_settingsMutex);
|
||||||
_settings->setValue("LastScriptLocation", _previousScriptLocation);
|
_settings->setValue("LastScriptLocation", _previousScriptLocation);
|
||||||
|
bumpSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::loadDialog() {
|
void Application::loadDialog() {
|
||||||
|
|
|
@ -725,6 +725,9 @@ void Menu::loadSettings(QSettings* settings) {
|
||||||
Application::getInstance()->updateWindowTitle();
|
Application::getInstance()->updateWindowTitle();
|
||||||
NodeList::getInstance()->loadData(settings);
|
NodeList::getInstance()->loadData(settings);
|
||||||
|
|
||||||
|
// notify that a settings has changed
|
||||||
|
connect(&NodeList::getInstance()->getDomainHandler(), &DomainHandler::hostnameChanged, this, &Menu::bumpSettings);
|
||||||
|
|
||||||
// MyAvatar caches some menu options, so we have to update them whenever we load settings.
|
// MyAvatar caches some menu options, so we have to update them whenever we load settings.
|
||||||
// TODO: cache more settings in MyAvatar that are checked with very high frequency.
|
// TODO: cache more settings in MyAvatar that are checked with very high frequency.
|
||||||
MyAvatar* myAvatar = Application::getInstance()->getAvatar();
|
MyAvatar* myAvatar = Application::getInstance()->getAvatar();
|
||||||
|
@ -894,6 +897,8 @@ void Menu::handleViewFrustumOffsetKeyModifier(int key) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bumpSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::addDisabledActionAndSeparator(QMenu* destinationMenu, const QString& actionName, int menuItemLocation) {
|
void Menu::addDisabledActionAndSeparator(QMenu* destinationMenu, const QString& actionName, int menuItemLocation) {
|
||||||
|
@ -1000,7 +1005,7 @@ QAction* Menu::addCheckableActionToQMenuAndActionHash(QMenu* destinationMenu,
|
||||||
QAction::NoRole, menuItemLocation);
|
QAction::NoRole, menuItemLocation);
|
||||||
action->setCheckable(true);
|
action->setCheckable(true);
|
||||||
action->setChecked(checked);
|
action->setChecked(checked);
|
||||||
connect(action, SIGNAL(changed()), Application::getInstance(), SLOT(bumpSettings()));
|
connect(action, SIGNAL(changed()), this, SLOT(bumpSettings()));
|
||||||
|
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
@ -1042,6 +1047,10 @@ void Menu::aboutApp() {
|
||||||
InfoView::forcedShow();
|
InfoView::forcedShow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Menu::bumpSettings() {
|
||||||
|
Application::getInstance()->bumpSettings();
|
||||||
|
}
|
||||||
|
|
||||||
void sendFakeEnterEvent() {
|
void sendFakeEnterEvent() {
|
||||||
QPoint lastCursorPosition = QCursor::pos();
|
QPoint lastCursorPosition = QCursor::pos();
|
||||||
QGLWidget* glWidget = Application::getInstance()->getGLWidget();
|
QGLWidget* glWidget = Application::getInstance()->getGLWidget();
|
||||||
|
@ -1115,6 +1124,8 @@ void Menu::changePrivateKey() {
|
||||||
// pull the private key from the dialog
|
// pull the private key from the dialog
|
||||||
_walletPrivateKey = privateKeyDialog.textValue().toUtf8();
|
_walletPrivateKey = privateKeyDialog.textValue().toUtf8();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bumpSettings();
|
||||||
|
|
||||||
sendFakeEnterEvent();
|
sendFakeEnterEvent();
|
||||||
}
|
}
|
||||||
|
@ -1637,10 +1648,12 @@ void Menu::resetLODAdjust() {
|
||||||
|
|
||||||
void Menu::setVoxelSizeScale(float sizeScale) {
|
void Menu::setVoxelSizeScale(float sizeScale) {
|
||||||
_voxelSizeScale = sizeScale;
|
_voxelSizeScale = sizeScale;
|
||||||
|
bumpSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::setBoundaryLevelAdjust(int boundaryLevelAdjust) {
|
void Menu::setBoundaryLevelAdjust(int boundaryLevelAdjust) {
|
||||||
_boundaryLevelAdjust = boundaryLevelAdjust;
|
_boundaryLevelAdjust = boundaryLevelAdjust;
|
||||||
|
bumpSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::lodTools() {
|
void Menu::lodTools() {
|
||||||
|
@ -1930,5 +1943,6 @@ QString Menu::getSnapshotsLocation() const {
|
||||||
|
|
||||||
void Menu::setScriptsLocation(const QString& scriptsLocation) {
|
void Menu::setScriptsLocation(const QString& scriptsLocation) {
|
||||||
_scriptsLocation = scriptsLocation;
|
_scriptsLocation = scriptsLocation;
|
||||||
|
bumpSettings();
|
||||||
emit scriptLocationChanged(scriptsLocation);
|
emit scriptLocationChanged(scriptsLocation);
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,20 +92,20 @@ public:
|
||||||
const InboundAudioStream::Settings& getReceivedAudioStreamSettings() const { return _receivedAudioStreamSettings; }
|
const InboundAudioStream::Settings& getReceivedAudioStreamSettings() const { return _receivedAudioStreamSettings; }
|
||||||
void setReceivedAudioStreamSettings(const InboundAudioStream::Settings& receivedAudioStreamSettings) { _receivedAudioStreamSettings = receivedAudioStreamSettings; }
|
void setReceivedAudioStreamSettings(const InboundAudioStream::Settings& receivedAudioStreamSettings) { _receivedAudioStreamSettings = receivedAudioStreamSettings; }
|
||||||
float getFieldOfView() const { return _fieldOfView; }
|
float getFieldOfView() const { return _fieldOfView; }
|
||||||
void setFieldOfView(float fieldOfView) { _fieldOfView = fieldOfView; }
|
void setFieldOfView(float fieldOfView) { _fieldOfView = fieldOfView; bumpSettings(); }
|
||||||
float getRealWorldFieldOfView() const { return _realWorldFieldOfView; }
|
float getRealWorldFieldOfView() const { return _realWorldFieldOfView; }
|
||||||
void setRealWorldFieldOfView(float realWorldFieldOfView) { _realWorldFieldOfView = realWorldFieldOfView; }
|
void setRealWorldFieldOfView(float realWorldFieldOfView) { _realWorldFieldOfView = realWorldFieldOfView; bumpSettings(); }
|
||||||
float getOculusUIAngularSize() const { return _oculusUIAngularSize; }
|
float getOculusUIAngularSize() const { return _oculusUIAngularSize; }
|
||||||
void setOculusUIAngularSize(float oculusUIAngularSize) { _oculusUIAngularSize = oculusUIAngularSize; }
|
void setOculusUIAngularSize(float oculusUIAngularSize) { _oculusUIAngularSize = oculusUIAngularSize; bumpSettings(); }
|
||||||
float getSixenseReticleMoveSpeed() const { return _sixenseReticleMoveSpeed; }
|
float getSixenseReticleMoveSpeed() const { return _sixenseReticleMoveSpeed; }
|
||||||
void setSixenseReticleMoveSpeed(float sixenseReticleMoveSpeed) { _sixenseReticleMoveSpeed = sixenseReticleMoveSpeed; }
|
void setSixenseReticleMoveSpeed(float sixenseReticleMoveSpeed) { _sixenseReticleMoveSpeed = sixenseReticleMoveSpeed; bumpSettings(); }
|
||||||
bool getInvertSixenseButtons() const { return _invertSixenseButtons; }
|
bool getInvertSixenseButtons() const { return _invertSixenseButtons; }
|
||||||
void setInvertSixenseButtons(bool invertSixenseButtons) { _invertSixenseButtons = invertSixenseButtons; }
|
void setInvertSixenseButtons(bool invertSixenseButtons) { _invertSixenseButtons = invertSixenseButtons; bumpSettings(); }
|
||||||
|
|
||||||
float getFaceshiftEyeDeflection() const { return _faceshiftEyeDeflection; }
|
float getFaceshiftEyeDeflection() const { return _faceshiftEyeDeflection; }
|
||||||
void setFaceshiftEyeDeflection(float faceshiftEyeDeflection) { _faceshiftEyeDeflection = faceshiftEyeDeflection; }
|
void setFaceshiftEyeDeflection(float faceshiftEyeDeflection) { _faceshiftEyeDeflection = faceshiftEyeDeflection; bumpSettings(); }
|
||||||
QString getSnapshotsLocation() const;
|
QString getSnapshotsLocation() const;
|
||||||
void setSnapshotsLocation(QString snapshotsLocation) { _snapshotsLocation = snapshotsLocation; }
|
void setSnapshotsLocation(QString snapshotsLocation) { _snapshotsLocation = snapshotsLocation; bumpSettings(); }
|
||||||
|
|
||||||
const QString& getScriptsLocation() const { return _scriptsLocation; }
|
const QString& getScriptsLocation() const { return _scriptsLocation; }
|
||||||
void setScriptsLocation(const QString& scriptsLocation);
|
void setScriptsLocation(const QString& scriptsLocation);
|
||||||
|
@ -128,13 +128,13 @@ public:
|
||||||
void resetLODAdjust();
|
void resetLODAdjust();
|
||||||
void setVoxelSizeScale(float sizeScale);
|
void setVoxelSizeScale(float sizeScale);
|
||||||
float getVoxelSizeScale() const { return _voxelSizeScale; }
|
float getVoxelSizeScale() const { return _voxelSizeScale; }
|
||||||
void setAutomaticAvatarLOD(bool automaticAvatarLOD) { _automaticAvatarLOD = automaticAvatarLOD; }
|
void setAutomaticAvatarLOD(bool automaticAvatarLOD) { _automaticAvatarLOD = automaticAvatarLOD; bumpSettings(); }
|
||||||
bool getAutomaticAvatarLOD() const { return _automaticAvatarLOD; }
|
bool getAutomaticAvatarLOD() const { return _automaticAvatarLOD; }
|
||||||
void setAvatarLODDecreaseFPS(float avatarLODDecreaseFPS) { _avatarLODDecreaseFPS = avatarLODDecreaseFPS; }
|
void setAvatarLODDecreaseFPS(float avatarLODDecreaseFPS) { _avatarLODDecreaseFPS = avatarLODDecreaseFPS; bumpSettings(); }
|
||||||
float getAvatarLODDecreaseFPS() const { return _avatarLODDecreaseFPS; }
|
float getAvatarLODDecreaseFPS() const { return _avatarLODDecreaseFPS; }
|
||||||
void setAvatarLODIncreaseFPS(float avatarLODIncreaseFPS) { _avatarLODIncreaseFPS = avatarLODIncreaseFPS; }
|
void setAvatarLODIncreaseFPS(float avatarLODIncreaseFPS) { _avatarLODIncreaseFPS = avatarLODIncreaseFPS; bumpSettings(); }
|
||||||
float getAvatarLODIncreaseFPS() const { return _avatarLODIncreaseFPS; }
|
float getAvatarLODIncreaseFPS() const { return _avatarLODIncreaseFPS; }
|
||||||
void setAvatarLODDistanceMultiplier(float multiplier) { _avatarLODDistanceMultiplier = multiplier; }
|
void setAvatarLODDistanceMultiplier(float multiplier) { _avatarLODDistanceMultiplier = multiplier; bumpSettings(); }
|
||||||
float getAvatarLODDistanceMultiplier() const { return _avatarLODDistanceMultiplier; }
|
float getAvatarLODDistanceMultiplier() const { return _avatarLODDistanceMultiplier; }
|
||||||
void setBoundaryLevelAdjust(int boundaryLevelAdjust);
|
void setBoundaryLevelAdjust(int boundaryLevelAdjust);
|
||||||
int getBoundaryLevelAdjust() const { return _boundaryLevelAdjust; }
|
int getBoundaryLevelAdjust() const { return _boundaryLevelAdjust; }
|
||||||
|
@ -145,7 +145,7 @@ public:
|
||||||
|
|
||||||
// User Tweakable PPS from Voxel Server
|
// User Tweakable PPS from Voxel Server
|
||||||
int getMaxVoxelPacketsPerSecond() const { return _maxVoxelPacketsPerSecond; }
|
int getMaxVoxelPacketsPerSecond() const { return _maxVoxelPacketsPerSecond; }
|
||||||
void setMaxVoxelPacketsPerSecond(int maxVoxelPacketsPerSecond) { _maxVoxelPacketsPerSecond = maxVoxelPacketsPerSecond; }
|
void setMaxVoxelPacketsPerSecond(int maxVoxelPacketsPerSecond) { _maxVoxelPacketsPerSecond = maxVoxelPacketsPerSecond; bumpSettings(); }
|
||||||
|
|
||||||
QAction* addActionToQMenuAndActionHash(QMenu* destinationMenu,
|
QAction* addActionToQMenuAndActionHash(QMenu* destinationMenu,
|
||||||
const QString& actionName,
|
const QString& actionName,
|
||||||
|
@ -206,6 +206,7 @@ public slots:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void aboutApp();
|
void aboutApp();
|
||||||
|
void bumpSettings();
|
||||||
void editPreferences();
|
void editPreferences();
|
||||||
void editAttachments();
|
void editAttachments();
|
||||||
void editAnimations();
|
void editAnimations();
|
||||||
|
|
|
@ -210,7 +210,6 @@ void PreferencesDialog::savePreferences() {
|
||||||
|
|
||||||
if (shouldDispatchIdentityPacket) {
|
if (shouldDispatchIdentityPacket) {
|
||||||
myAvatar->sendIdentityPacket();
|
myAvatar->sendIdentityPacket();
|
||||||
Application::getInstance()->bumpSettings();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Menu::getInstance()->isOptionChecked(MenuOption::DisableActivityLogger)
|
if (!Menu::getInstance()->isOptionChecked(MenuOption::DisableActivityLogger)
|
||||||
|
@ -263,4 +262,6 @@ void PreferencesDialog::savePreferences() {
|
||||||
|
|
||||||
Application::getInstance()->resizeGL(Application::getInstance()->getGLWidget()->width(),
|
Application::getInstance()->resizeGL(Application::getInstance()->getGLWidget()->width(),
|
||||||
Application::getInstance()->getGLWidget()->height());
|
Application::getInstance()->getGLWidget()->height());
|
||||||
|
|
||||||
|
Application::getInstance()->bumpSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,11 +88,13 @@ bool RearMirrorTools::mousePressEvent(int x, int y) {
|
||||||
|
|
||||||
if (_headZoomIconRect.contains(x, y)) {
|
if (_headZoomIconRect.contains(x, y)) {
|
||||||
_zoomLevel = HEAD;
|
_zoomLevel = HEAD;
|
||||||
|
Application::getInstance()->bumpSettings();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_bodyZoomIconRect.contains(x, y)) {
|
if (_bodyZoomIconRect.contains(x, y)) {
|
||||||
_zoomLevel = BODY;
|
_zoomLevel = BODY;
|
||||||
|
Application::getInstance()->bumpSettings();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue