Refactoring.
This commit is contained in:
parent
6565cc6355
commit
9178456a9f
|
@ -183,11 +183,10 @@ auto VAbstractMainWindow::ContinueFormatRewrite(const QString ¤tFormatVers
|
|||
VAbstractApplication::VApp()->Settings()->SetConfirmFormatRewriting(not msgBox.isChecked());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -395,18 +394,20 @@ void VAbstractMainWindow::ExportDataToCSV()
|
|||
return;
|
||||
}
|
||||
|
||||
VCommonSettings *settings = VAbstractApplication::VApp()->Settings();
|
||||
|
||||
DialogExportToCSV dialog(this);
|
||||
dialog.SetWithHeader(VAbstractApplication::VApp()->Settings()->GetCSVWithHeader());
|
||||
dialog.SetSelectedMib(VAbstractApplication::VApp()->Settings()->GetCSVCodec());
|
||||
dialog.SetSeparator(VAbstractApplication::VApp()->Settings()->GetCSVSeparator());
|
||||
dialog.SetWithHeader(settings->GetCSVWithHeader());
|
||||
dialog.SetSelectedMib(settings->GetCSVCodec());
|
||||
dialog.SetSeparator(settings->GetCSVSeparator());
|
||||
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
ExportToCSVData(fileName, dialog.IsWithHeader(), dialog.GetSelectedMib(), dialog.GetSeparator());
|
||||
|
||||
VAbstractApplication::VApp()->Settings()->SetCSVSeparator(dialog.GetSeparator());
|
||||
VAbstractApplication::VApp()->Settings()->SetCSVCodec(dialog.GetSelectedMib());
|
||||
VAbstractApplication::VApp()->Settings()->SetCSVWithHeader(dialog.IsWithHeader());
|
||||
settings->SetCSVSeparator(dialog.GetSeparator());
|
||||
settings->SetCSVCodec(dialog.GetSelectedMib());
|
||||
settings->SetCSVWithHeader(dialog.IsWithHeader());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user