diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-02-19 14:42:32 +0200 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@qt.io> | 2018-02-20 04:27:20 +0000 |
commit | 91571c6a16fc34f663b1adce37f5015929aef78a (patch) | |
tree | 1fcb021e949c43bdf8eab9b914f9d3de96091dfa | |
parent | 9d84b269e30d01ae619d8ac014f5b4339d032758 (diff) |
Remove current presentation from possible subpresentations
Task-number: QT3DS-1147
Change-Id: I1c6c09a2660d2aabe8bc3229e9f8a04d0a334729
Reviewed-by: Marianne Yrjänä <marianne.yrjana@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r-- | src/Authoring/Studio/_Win/Application/SubPresentationDlg.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Authoring/Studio/_Win/Application/SubPresentationDlg.cpp b/src/Authoring/Studio/_Win/Application/SubPresentationDlg.cpp index a70b0d23..3850afd5 100644 --- a/src/Authoring/Studio/_Win/Application/SubPresentationDlg.cpp +++ b/src/Authoring/Studio/_Win/Application/SubPresentationDlg.cpp @@ -28,6 +28,9 @@ #include "SubPresentationDlg.h" #include "ui_SubPresentationDlg.h" +#include "Core.h" +#include "Doc.h" +#include "StudioApp.h" #include <QtWidgets/qabstractbutton.h> #include <QtWidgets/qfiledialog.h> @@ -140,7 +143,11 @@ void CSubPresentationDlg::updateUI() { } QDir dir(m_directory, filter, QDir::Name, QDir::Files); - m_ui->comboBoxFileList->addItems(dir.entryList()); + QStringList entryList = dir.entryList(); + // Remove the current presentation from the list of offered entries + QString currentPres = g_StudioApp.GetCore()->GetDoc()->GetDocumentPath().GetName().toQString(); + entryList.removeAll(currentPres); + m_ui->comboBoxFileList->addItems(entryList); if (!m_subPresentation.m_argsOrSrc.isEmpty()) { // Do not add the current file to the combobox if it is already there |