We can now set whether to use OpenGL in WE in the WE settings page. For whatever reason VMware despises the OpenGL viewport so it's a good idea to turn it off inside VMware.
--HG-- branch : hotfix
This commit is contained in:
parent
b530d99bf1
commit
44c6f93b26
4 changed files with 77 additions and 10 deletions
|
@ -17,9 +17,11 @@
|
||||||
// Project includes
|
// Project includes
|
||||||
#include "world_editor_settings_page.h"
|
#include "world_editor_settings_page.h"
|
||||||
#include "world_editor_constants.h"
|
#include "world_editor_constants.h"
|
||||||
|
#include "../core/icore.h"
|
||||||
|
|
||||||
// Qt includes
|
// Qt includes
|
||||||
#include <QtGui/QWidget>
|
#include <QtGui/QWidget>
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
// NeL includes
|
// NeL includes
|
||||||
|
|
||||||
|
@ -61,11 +63,31 @@ QWidget *WorldEditorSettingsPage::createPage(QWidget *parent)
|
||||||
{
|
{
|
||||||
m_currentPage = new QWidget(parent);
|
m_currentPage = new QWidget(parent);
|
||||||
m_ui.setupUi(m_currentPage);
|
m_ui.setupUi(m_currentPage);
|
||||||
|
readSettings();
|
||||||
|
|
||||||
return m_currentPage;
|
return m_currentPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WorldEditorSettingsPage::readSettings()
|
||||||
|
{
|
||||||
|
QSettings *settings = Core::ICore::instance()->settings();
|
||||||
|
settings->beginGroup(Constants::WORLD_EDITOR_SECTION);
|
||||||
|
bool b = false;
|
||||||
|
|
||||||
|
b = settings->value( Constants::WORLD_EDITOR_USE_OPENGL, true ).toBool();
|
||||||
|
m_ui.glCB->setChecked( b );
|
||||||
|
|
||||||
|
settings->endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
void WorldEditorSettingsPage::apply()
|
void WorldEditorSettingsPage::apply()
|
||||||
{
|
{
|
||||||
|
QSettings *settings = Core::ICore::instance()->settings();
|
||||||
|
settings->beginGroup(Constants::WORLD_EDITOR_SECTION);
|
||||||
|
bool b = false;
|
||||||
|
b = m_ui.glCB->isChecked();
|
||||||
|
settings->setValue( Constants::WORLD_EDITOR_USE_OPENGL, b );
|
||||||
|
settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* namespace WorldEditor */
|
} /* namespace WorldEditor */
|
|
@ -46,6 +46,7 @@ public:
|
||||||
QIcon categoryIcon() const;
|
QIcon categoryIcon() const;
|
||||||
virtual QWidget *createPage(QWidget *parent);
|
virtual QWidget *createPage(QWidget *parent);
|
||||||
|
|
||||||
|
virtual void readSettings();
|
||||||
virtual void apply();
|
virtual void apply();
|
||||||
virtual void finish() {}
|
virtual void finish() {}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<class>WorldEditorSettingsPage</class>
|
<class>WorldEditorSettingsPage</class>
|
||||||
<widget class="QWidget" name="WorldEditorSettingsPage">
|
<widget class="QWidget" name="WorldEditorSettingsPage">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
|
@ -25,6 +25,9 @@
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Workspace</string>
|
<string>Workspace</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -37,10 +40,18 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QSpinBox" name="spinBox_3"/>
|
<widget class="QSpinBox" name="spinBox_3">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QSpinBox" name="spinBox_4"/>
|
<widget class="QSpinBox" name="spinBox_4">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
|
@ -50,15 +61,32 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QSpinBox" name="spinBox_5"/>
|
<widget class="QSpinBox" name="spinBox_5">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="2">
|
||||||
<widget class="QSpinBox" name="spinBox_6"/>
|
<widget class="QSpinBox" name="spinBox_6">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="3">
|
<item row="2" column="0" colspan="3">
|
||||||
<widget class="QCheckBox" name="checkBox">
|
<widget class="QCheckBox" name="glCB">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use OpenGL</string>
|
<string>Use OpenGL ( requires restart )</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -79,7 +107,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QSpinBox" name="spinBox"/>
|
<widget class="QSpinBox" name="spinBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
|
@ -89,7 +121,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QSpinBox" name="spinBox_2"/>
|
<widget class="QSpinBox" name="spinBox_2">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
|
@ -101,10 +137,17 @@
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit"/>
|
<widget class="QLineEdit" name="lineEdit">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButton">
|
<widget class="QToolButton" name="toolButton">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -436,6 +436,7 @@ void WorldEditorWindow::writeSettings()
|
||||||
settings->beginGroup(Constants::WORLD_EDITOR_SECTION);
|
settings->beginGroup(Constants::WORLD_EDITOR_SECTION);
|
||||||
settings->setValue(Constants::WORLD_WINDOW_STATE, saveState());
|
settings->setValue(Constants::WORLD_WINDOW_STATE, saveState());
|
||||||
settings->setValue(Constants::WORLD_WINDOW_GEOMETRY, saveGeometry());
|
settings->setValue(Constants::WORLD_WINDOW_GEOMETRY, saveGeometry());
|
||||||
|
settings->setValue(Constants::WORLD_EDITOR_USE_OPENGL, settings->value(Constants::WORLD_EDITOR_USE_OPENGL));
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
settings->sync();
|
settings->sync();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue