Implemented helper method of QFileDialog::getSaveFileName to prevent user from saving files with invalid names.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
This commit is contained in:
+2
-2
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <AzFramework/API/ApplicationAPI.h>
|
||||
#include <AzQtComponents/Components/Widgets/BrowseEdit.h>
|
||||
#include <AzQtComponents/Components/Widgets/FileDialog.h>
|
||||
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
|
||||
#include <AzToolsFramework/API/EditorWindowRequestBus.h>
|
||||
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
|
||||
@@ -22,7 +23,6 @@ AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnin
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFileDialog>
|
||||
#include <QHBoxLayout>
|
||||
#include <QHeaderView>
|
||||
#include <QLabel>
|
||||
@@ -145,7 +145,7 @@ namespace AZ
|
||||
|
||||
// Whenever the browse button is clicked, open a save file dialog in the same location as the current export file setting
|
||||
QObject::connect(materialFileWidget, &AzQtComponents::BrowseEdit::attachedButtonTriggered, materialFileWidget, [&dialog, &exportItem, materialFileWidget, overwriteCheckBox]() {
|
||||
QFileInfo fileInfo = QFileDialog::getSaveFileName(&dialog,
|
||||
QFileInfo fileInfo = AzQtComponents::FileDialog::GetSaveFileName(&dialog,
|
||||
QString("Select Material Filename"),
|
||||
exportItem.GetExportPath().c_str(),
|
||||
QString("Material (*.material)"),
|
||||
|
||||
Reference in New Issue
Block a user