diff options
| author | Tannin <devnull@localhost> | 2014-01-29 00:23:16 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-01-29 00:23:16 +0100 |
| commit | af50eedbe275062eda933ccc200be66a9d3ee94d (patch) | |
| tree | f6df3e578ca0d466d55b455e9d3ac9b3fe9c012a /src | |
| parent | 52e5dd3c5781d45fa3a929de6c7cce7405366300 (diff) | |
- bugfix: dds preview or transparent textures looked odd
- bugfix: lazy loaded data tree deleted the placeholder
Diffstat (limited to 'src')
| -rw-r--r-- | src/mainwindow.cpp | 11 | ||||
| -rw-r--r-- | src/mainwindow.h | 3 | ||||
| -rw-r--r-- | src/version.rc | 4 |
3 files changed, 14 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ce4471a6..ce2c02b6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1578,6 +1578,13 @@ void MainWindow::updateTo(QTreeWidgetItem *subTree, const std::wstring &director subTree->sortChildren(0, Qt::AscendingOrder); } +void MainWindow::delayedRemove() +{ + foreach (QTreeWidgetItem *item, m_RemoveWidget) { + item->removeChild(item->child(0)); + } + m_RemoveWidget.clear(); +} void MainWindow::expandDataTreeItem(QTreeWidgetItem *item) { @@ -1586,7 +1593,6 @@ void MainWindow::expandDataTreeItem(QTreeWidgetItem *item) QTreeWidgetItem *onDemandDataItem = item->child(0); std::wstring path = ToWString(onDemandDataItem->data(0, Qt::UserRole + 1).toString()); bool conflictsOnly = onDemandDataItem->data(0, Qt::UserRole + 2).toBool(); - item->removeChild(onDemandDataItem); std::wstring virtualPath = (path + L"\\").substr(6) + ToWString(item->text(0)); DirectoryEntry *dir = m_DirectoryStructure->findSubDirectoryRecursive(virtualPath); @@ -1595,7 +1601,8 @@ void MainWindow::expandDataTreeItem(QTreeWidgetItem *item) } else { qWarning("failed to update view of %ls", path.c_str()); } - + m_RemoveWidget.push_back(item); + QTimer::singleShot(5, this, SLOT(delayedRemove())); } } diff --git a/src/mainwindow.h b/src/mainwindow.h index b247b924..527db8b3 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -372,6 +372,8 @@ private: QFileSystemWatcher m_SavesWatcher; + std::vector<QTreeWidgetItem*> m_RemoveWidget; + private slots: void showMessage(const QString &message); @@ -529,6 +531,7 @@ private slots: void refreshSavesIfOpen(); void expandDataTreeItem(QTreeWidgetItem *item); void about(); + void delayedRemove(); private slots: // ui slots // actions diff --git a/src/version.rc b/src/version.rc index 1beee814..14b2781f 100644 --- a/src/version.rc +++ b/src/version.rc @@ -1,7 +1,7 @@ #include "Winver.h"
-#define VER_FILEVERSION 1,1,0,0
-#define VER_FILEVERSION_STR "1,1,0,0\0"
+#define VER_FILEVERSION 1,1,1,0
+#define VER_FILEVERSION_STR "1,1,1,0\0"
VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION
|
