summaryrefslogtreecommitdiff
path: root/retrace/daemon/ui/glframe_state_model.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'retrace/daemon/ui/glframe_state_model.cpp')
-rw-r--r--retrace/daemon/ui/glframe_state_model.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/retrace/daemon/ui/glframe_state_model.cpp b/retrace/daemon/ui/glframe_state_model.cpp
index 741643f1..e94ce39f 100644
--- a/retrace/daemon/ui/glframe_state_model.cpp
+++ b/retrace/daemon/ui/glframe_state_model.cpp
@@ -34,6 +34,7 @@
#include "glframe_os.hpp"
#include "glframe_retrace_render.hpp"
+#include "glframe_state_enums.hpp"
using glretrace::QStateModel;
using glretrace::QStateValue;
@@ -99,19 +100,6 @@ QQmlListProperty<QStateValue> QStateModel::state() {
return QQmlListProperty<glretrace::QStateValue>(this, m_states);
}
-std::vector<std::string>
-name_to_choices(const std::string &n) {
- switch (state_name_to_enum(n)) {
- case GL_CULL_FACE:
- return {"true", "false"};
- case GL_CULL_FACE_MODE:
- return {"GL_FRONT", "GL_BACK", "GL_FRONT_AND_BACK"};
- case GL_INVALID_ENUM:
- default:
- assert(false);
- }
-}
-
void
QStateModel::clear() {
// QObjects being displayed in the UI must be cleared from the UI
@@ -189,7 +177,7 @@ void QStateModel::onState(SelectionId selectionCount,
item.group,
item.path,
name,
- name_to_choices(name));
+ state_name_to_choices(name));
m_state_by_name[item] = i;
state_value = m_state_by_name.find(item);
m_for_deletion.push_back(i);