updated save dialog to take file path from command line instead it had in settings
--HG-- branch : develop
This commit is contained in:
parent
7c6cd2e4a0
commit
8fabf871d8
|
@ -122,6 +122,20 @@ QString DialogSaveLayout::MakeHelpFormatList()
|
|||
return out;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogSaveLayout::SetFullPath(const QString &cmdFileName)
|
||||
{
|
||||
QFileInfo fn(cmdFileName);
|
||||
fn.makeAbsolute();
|
||||
auto p = fn.dir().absolutePath();
|
||||
auto n = fn.fileName()+"_";
|
||||
QTextStream sout(stdout);
|
||||
|
||||
sout << tr("Output full path: ") << fn.filePath() << "\n";
|
||||
ui->lineEditPath->setText(p);
|
||||
ui->lineEditFileName->setText(n);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
DialogSaveLayout::~DialogSaveLayout()
|
||||
{
|
||||
|
@ -154,7 +168,7 @@ QString DialogSaveLayout::Formate() const
|
|||
void DialogSaveLayout::Save()
|
||||
{
|
||||
for (int i=0; i < count; ++i)
|
||||
{
|
||||
{
|
||||
const QString name = Path()+"/"+FileName()+QString::number(i+1)+Formate();
|
||||
if (QFile::exists(name))
|
||||
{
|
||||
|
|
|
@ -93,7 +93,7 @@ public:
|
|||
QString Formate() const;
|
||||
void SelectFormate(const size_t formate);
|
||||
static QString MakeHelpFormatList();
|
||||
|
||||
void SetFullPath(const QString& cmdFileName);
|
||||
public slots:
|
||||
void Save();
|
||||
void ShowExample();
|
||||
|
|
|
@ -3482,6 +3482,7 @@ void MainWindow::DoExport(const VCommandLinePtr &expParams)
|
|||
PrepareDetailsForLayout(details);
|
||||
LayoutSettings(*settings.get());
|
||||
DialogSaveLayout dialog(scenes.size(), expParams->OptExportPath(), this);
|
||||
dialog.SetFullPath(expParams->OptExportPath());
|
||||
dialog.SelectFormate(expParams->OptExportType());
|
||||
ExportLayout(dialog);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user