Skip to content

Commit

Permalink
Force correct file ending when exporting touchstone files
Browse files Browse the repository at this point in the history
  • Loading branch information
jankae committed Jan 22, 2025
1 parent ab9605c commit 5239464
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ bool TraceTouchstoneExport::setPortNum(int ports)

void TraceTouchstoneExport::on_buttonBox_accepted()
{
auto filename = QFileDialog::getSaveFileName(this, "Select file for exporting traces", "", "Touchstone files (*.s1p *.s2p *.s3p *.s4p)", nullptr, Preferences::QFileDialogOptions());
auto ports = ui->sbPorts->value();
QString extension = ".s"+QString::number(ports)+"p";
auto filename = QFileDialog::getSaveFileName(this, "Select file for exporting traces", "", "Touchstone files (*"+extension+")", nullptr, Preferences::QFileDialogOptions());
if(filename.length() > 0) {
auto ports = ui->sbPorts->value();
auto t = Touchstone(ports);
t.setReferenceImpedance(ui->selector->getReferenceImpedance());
// add trace points to touchstone
Expand Down

0 comments on commit 5239464

Please sign in to comment.