mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +02:00
fix the dialog mouselook bug
This commit is contained in:
parent
21fe7e6fe0
commit
7b9eb55bda
1 changed files with 7 additions and 15 deletions
|
@ -745,7 +745,7 @@ QLineEdit* lineEditForDomainHostname() {
|
|||
|
||||
void Menu::login() {
|
||||
Application* applicationInstance = Application::getInstance();
|
||||
QDialog dialog(applicationInstance->getGLWidget());
|
||||
QDialog dialog;
|
||||
dialog.setWindowTitle("Login");
|
||||
QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom);
|
||||
dialog.setLayout(layout);
|
||||
|
@ -764,7 +764,6 @@ void Menu::login() {
|
|||
layout->addWidget(buttons);
|
||||
|
||||
int ret = dialog.exec();
|
||||
applicationInstance->getWindow()->activateWindow();
|
||||
if (ret != QDialog::Accepted) {
|
||||
return;
|
||||
}
|
||||
|
@ -779,7 +778,7 @@ void Menu::login() {
|
|||
void Menu::editPreferences() {
|
||||
Application* applicationInstance = Application::getInstance();
|
||||
|
||||
QDialog dialog(applicationInstance->getGLWidget());
|
||||
QDialog dialog;
|
||||
dialog.setWindowTitle("Interface Preferences");
|
||||
QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom);
|
||||
dialog.setLayout(layout);
|
||||
|
@ -837,7 +836,6 @@ void Menu::editPreferences() {
|
|||
layout->addWidget(buttons);
|
||||
|
||||
int ret = dialog.exec();
|
||||
applicationInstance->getWindow()->activateWindow();
|
||||
if (ret != QDialog::Accepted) {
|
||||
return;
|
||||
}
|
||||
|
@ -887,8 +885,7 @@ void Menu::editPreferences() {
|
|||
}
|
||||
|
||||
void Menu::goToDomain() {
|
||||
Application* applicationInstance = Application::getInstance();
|
||||
QDialog dialog(applicationInstance->getGLWidget());
|
||||
QDialog dialog;
|
||||
dialog.setWindowTitle("Go To Domain");
|
||||
QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom);
|
||||
dialog.setLayout(layout);
|
||||
|
@ -906,7 +903,6 @@ void Menu::goToDomain() {
|
|||
layout->addWidget(buttons);
|
||||
|
||||
int ret = dialog.exec();
|
||||
applicationInstance->getWindow()->activateWindow();
|
||||
if (ret != QDialog::Accepted) {
|
||||
return;
|
||||
}
|
||||
|
@ -915,8 +911,7 @@ void Menu::goToDomain() {
|
|||
}
|
||||
|
||||
void Menu::goToLocation() {
|
||||
Application* applicationInstance = Application::getInstance();
|
||||
QDialog dialog(applicationInstance->getGLWidget());
|
||||
QDialog dialog;
|
||||
dialog.setWindowTitle("Go To Location");
|
||||
QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom);
|
||||
dialog.setLayout(layout);
|
||||
|
@ -926,8 +921,8 @@ void Menu::goToLocation() {
|
|||
|
||||
const int QLINE_MINIMUM_WIDTH = 300;
|
||||
|
||||
Application* appInstance = Application::getInstance();
|
||||
MyAvatar* myAvatar = appInstance->getAvatar();
|
||||
Application* applicationInstance = Application::getInstance();
|
||||
MyAvatar* myAvatar = applicationInstance->getAvatar();
|
||||
glm::vec3 avatarPos = myAvatar->getPosition();
|
||||
QString currentLocation = QString("%1, %2, %3").arg(QString::number(avatarPos.x),
|
||||
QString::number(avatarPos.y), QString::number(avatarPos.z));
|
||||
|
@ -942,7 +937,6 @@ void Menu::goToLocation() {
|
|||
layout->addWidget(buttons);
|
||||
|
||||
int ret = dialog.exec();
|
||||
applicationInstance->getWindow()->activateWindow();
|
||||
if (ret != QDialog::Accepted) {
|
||||
return;
|
||||
}
|
||||
|
@ -974,8 +968,7 @@ void Menu::goToLocation() {
|
|||
}
|
||||
|
||||
void Menu::goToUser() {
|
||||
Application* applicationInstance = Application::getInstance();
|
||||
QDialog dialog(applicationInstance->getGLWidget());
|
||||
QDialog dialog;
|
||||
dialog.setWindowTitle("Go To User");
|
||||
QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom);
|
||||
dialog.setLayout(layout);
|
||||
|
@ -993,7 +986,6 @@ void Menu::goToUser() {
|
|||
layout->addWidget(buttons);
|
||||
|
||||
int ret = dialog.exec();
|
||||
applicationInstance->getWindow()->activateWindow();
|
||||
if (ret != QDialog::Accepted) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue