From f1cc0f792810b3e038edd53ee487a658fc85b668 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 22 May 2013 17:35:52 +0000 Subject: [PATCH] Corrected a bug that prevented using Setup | Configuration without an existing wsjtx.ini file. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3297 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- devsetup.cpp | 21 +++++++++++---------- mainwindow.cpp | 2 +- wsjtx.iss | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/devsetup.cpp b/devsetup.cpp index 4d1ae0716..88da846d0 100644 --- a/devsetup.cpp +++ b/devsetup.cpp @@ -182,16 +182,17 @@ void DevSetup::initDlg() ui.pttComboBox->setCurrentIndex(m_tmp); ui.catPortComboBox->setCurrentIndex(m_catPortIndex); - ui.macro1->setText(m_macro[0].toUpper()); - ui.macro2->setText(m_macro[1].toUpper()); - ui.macro3->setText(m_macro[2].toUpper()); - ui.macro4->setText(m_macro[3].toUpper()); - ui.macro5->setText(m_macro[4].toUpper()); - ui.macro6->setText(m_macro[5].toUpper()); - ui.macro7->setText(m_macro[6].toUpper()); - ui.macro8->setText(m_macro[7].toUpper()); - ui.macro9->setText(m_macro[8].toUpper()); - ui.macro10->setText(m_macro[9].toUpper()); + int n=m_macro.length(); + if(n>=1) ui.macro1->setText(m_macro[0].toUpper()); + if(n>=2) ui.macro2->setText(m_macro[1].toUpper()); + if(n>=3) ui.macro3->setText(m_macro[2].toUpper()); + if(n>=4) ui.macro4->setText(m_macro[3].toUpper()); + if(n>=5) ui.macro5->setText(m_macro[4].toUpper()); + if(n>=6) ui.macro6->setText(m_macro[5].toUpper()); + if(n>=7) ui.macro7->setText(m_macro[6].toUpper()); + if(n>=8) ui.macro8->setText(m_macro[7].toUpper()); + if(n>=8) ui.macro9->setText(m_macro[8].toUpper()); + if(n>=10) ui.macro10->setText(m_macro[9].toUpper()); ui.f1->setText(m_dFreq[0]); ui.f2->setText(m_dFreq[1]); diff --git a/mainwindow.cpp b/mainwindow.cpp index 164b49bd1..ebfda0041 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//--------------------------------------------------------------- MainWindow +//---------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h" diff --git a/wsjtx.iss b/wsjtx.iss index 55646ae98..fb9b3f7d5 100644 --- a/wsjtx.iss +++ b/wsjtx.iss @@ -1,6 +1,6 @@ [Setup] AppName=wsjtx -AppVerName=wsjtx Version 0.99 r3295 +AppVerName=wsjtx Version 0.99 r3297 AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT DefaultDirName=c:\wsjtx DefaultGroupName=wsjtx