From 3f2713bd16e93ee5ddaf31873cb01215d154d74e Mon Sep 17 00:00:00 2001 From: Maxim Stewart <1itdominator@gmail.com> Date: Sun, 18 Jun 2017 06:45:40 -0500 Subject: [PATCH] Fixed logic issue with offset file to file name in listWidget. Edited feel of settings window a bit --- QtMeshViewer/Form Files/SettingsWindow.ui | 294 +++++++++++----------- QtMeshViewer/Source/MainWindow.cpp | 9 +- 2 files changed, 151 insertions(+), 152 deletions(-) diff --git a/QtMeshViewer/Form Files/SettingsWindow.ui b/QtMeshViewer/Form Files/SettingsWindow.ui index 55ccb54..c8df29a 100644 --- a/QtMeshViewer/Form Files/SettingsWindow.ui +++ b/QtMeshViewer/Form Files/SettingsWindow.ui @@ -6,7 +6,7 @@ 0 0 - 481 + 503 645 @@ -290,6 +290,100 @@ Light + + + + Ambientcoefficient: + + + + + + + 255 + + + 255 + + + Qt::Horizontal + + + + + + + true + + + + 55 + 16777215 + + + + 3 + + + 1.000000000000000 + + + 0.001000000000000 + + + 0.005000000000000 + + + + + + + false + + + + 55 + 16777215 + + + + 1 + + + 0.100000000000000 + + + + + + + R: + + + + + + + Directional light + + + true + + + + + + + 255 + + + 255 + + + Qt::Horizontal + + + @@ -306,6 +400,26 @@ + + + + Point light + + + + + + + 255 + + + 255 + + + Qt::Horizontal + + + @@ -313,13 +427,6 @@ - - - - Attenuationfactor: - - - @@ -336,6 +443,13 @@ + + + + Attenuationfactor: + + + @@ -366,120 +480,6 @@ - - - - Point light - - - - - - - 255 - - - 255 - - - Qt::Horizontal - - - - - - - 255 - - - 255 - - - Qt::Horizontal - - - - - - - R: - - - - - - - Directional light - - - true - - - - - - - false - - - - 55 - 16777215 - - - - 1 - - - 0.100000000000000 - - - - - - - true - - - - 55 - 16777215 - - - - 3 - - - 1.000000000000000 - - - 0.001000000000000 - - - 0.005000000000000 - - - - - - - 255 - - - 255 - - - Qt::Horizontal - - - - - - - Ambientcoefficient: - - - @@ -489,14 +489,21 @@ General - - + + - Directory Drop Down List: + Backface Culling + + + Zoom speed: + + + + Qt::Horizontal @@ -509,14 +516,7 @@ - - - - Zoom speed: - - - - + % @@ -532,35 +532,35 @@ - - + + - Backface Culling + Directory Drop Down List: - - + + + + + - + + *** "BF1_ModTools" Goes To "C:/BF1_ModTools/Assets/Shipped Worlds/" + "BF2_ModTools" Goes To "C:/BF2_ModTools/assets/Sides/" - + -- - - - - - + + - *** "BF1_ModTools" Goes To "C:/BF1_ModTools/Assets/Shipped Worlds/" - "BF2_ModTools" Goes To "C:/BF2_ModTools/assets/Sides/" + + diff --git a/QtMeshViewer/Source/MainWindow.cpp b/QtMeshViewer/Source/MainWindow.cpp index 0371df8..f8d9d22 100644 --- a/QtMeshViewer/Source/MainWindow.cpp +++ b/QtMeshViewer/Source/MainWindow.cpp @@ -183,14 +183,13 @@ void MainWindow::updateAssetTree(QString path) { ui->fileListWidget->clear(); m_Paths.clear(); - - QDirIterator itterator(path, QStringList() << "*.msh" << "*.MSH" << "*.mesh" << "*.MESH", + QDirIterator itterator(path, QStringList() << "*.msh" << "*.MSH" << "*.mesh" << "*.MESH", QDir::Files, QDirIterator::Subdirectories); while (itterator.hasNext()) { - - ui->fileListWidget->insertItem(0, new QListWidgetItem(itterator.fileName())); - m_Paths.append(itterator.next()); + ui->fileListWidget->insertItem(0, new QListWidgetItem(itterator.fileName())); + m_Paths.prepend(itterator.fileInfo().absoluteFilePath()); + itterator.next(); } }