From 878cc2d573800a268fb655d788c1007accc804a8 Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 23 Jan 2015 13:40:17 +0200 Subject: [PATCH] Use pattern file name in mask. --HG-- branch : develop --- src/app/dialogs/app/dialogsavelayout.cpp | 4 +++- src/app/dialogs/app/dialogsavelayout.h | 3 ++- src/app/tablewindow.cpp | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/dialogs/app/dialogsavelayout.cpp b/src/app/dialogs/app/dialogsavelayout.cpp index bf7705278..fc04d1f22 100644 --- a/src/app/dialogs/app/dialogsavelayout.cpp +++ b/src/app/dialogs/app/dialogsavelayout.cpp @@ -35,7 +35,8 @@ #include //--------------------------------------------------------------------------------------------------------------------- -DialogSaveLayout::DialogSaveLayout(const QMap &formates, int count, QWidget *parent) +DialogSaveLayout::DialogSaveLayout(const QMap &formates, int count, const QString &mask, + QWidget *parent) :QDialog(parent), ui(new Ui::DialogSaveLAyout), count(count) { ui->setupUi(this); @@ -46,6 +47,7 @@ DialogSaveLayout::DialogSaveLayout(const QMap &formates, int c QRegExpValidator *validator = new QRegExpValidator(QRegExp("^[\\w\\-. ]+$"), this); ui->lineEditMask->setValidator(validator); + ui->lineEditMask->setText(mask); QMap::const_iterator i = formates.constBegin(); while (i != formates.constEnd()) diff --git a/src/app/dialogs/app/dialogsavelayout.h b/src/app/dialogs/app/dialogsavelayout.h index 74425a632..d1e083ed2 100644 --- a/src/app/dialogs/app/dialogsavelayout.h +++ b/src/app/dialogs/app/dialogsavelayout.h @@ -41,7 +41,8 @@ class DialogSaveLayout : public QDialog Q_OBJECT public: - DialogSaveLayout(const QMap &formates, int count, QWidget *parent = 0); + DialogSaveLayout(const QMap &formates, int count, const QString &mask = QString(), + QWidget *parent = 0); ~DialogSaveLayout(); QString Path() const; diff --git a/src/app/tablewindow.cpp b/src/app/tablewindow.cpp index dd706cc84..e92268020 100644 --- a/src/app/tablewindow.cpp +++ b/src/app/tablewindow.cpp @@ -164,7 +164,7 @@ void TableWindow::StopTable() void TableWindow::saveScene() { QMap extByMessage = InitFormates(); - DialogSaveLayout dialog(extByMessage, scenes.size(), this); + DialogSaveLayout dialog(extByMessage, scenes.size(), fileName, this); if (dialog.exec() == QDialog::Rejected) {