mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Fix unitChanged(int) signal in preferences
.. needed to be reconnected across pages to ensure the weight/height fields et al changed units when the user changed metric/imperial preferences.
This commit is contained in:
@@ -131,6 +131,9 @@ ConfigDialog::ConfigDialog(QDir _home, Zones *_zones, Context *context) :
|
||||
athlete->setWhatsThis(athleteHelp->getWhatsThisText(HelpWhatsThis::Preferences_Athlete_About));
|
||||
pagesWidget->addWidget(athlete);
|
||||
|
||||
// units change on general affects units used on entry in athlete pages
|
||||
connect (general->generalPage->unitCombo, SIGNAL(currentIndexChanged(int)), athlete->athletePage, SLOT(unitChanged(int)));
|
||||
|
||||
password = new PasswordConfig(_home, _zones, context);
|
||||
HelpWhatsThis *passwordHelp = new HelpWhatsThis(password);
|
||||
password->setWhatsThis(passwordHelp->getWhatsThisText(HelpWhatsThis::Preferences_Passwords));
|
||||
|
||||
@@ -62,6 +62,7 @@ class AthleteConfig : public QWidget
|
||||
|
||||
public:
|
||||
AthleteConfig(QDir home, Zones *zones, Context *context);
|
||||
RiderPage *athletePage;
|
||||
|
||||
public slots:
|
||||
qint32 saveClicked();
|
||||
@@ -72,7 +73,6 @@ class AthleteConfig : public QWidget
|
||||
Context *context;
|
||||
|
||||
// about me, power ones and hr zones
|
||||
RiderPage *athletePage;
|
||||
ZonePage *zonePage;
|
||||
HrZonePage *hrZonePage;
|
||||
PaceZonePage *paceZonePage;
|
||||
|
||||
@@ -105,9 +105,6 @@ GeneralPage::GeneralPage(Context *context) : context(context)
|
||||
configLayout->addWidget(unitlabel, 1,0, Qt::AlignRight);
|
||||
configLayout->addWidget(unitCombo, 1,1, Qt::AlignLeft);
|
||||
|
||||
connect (unitCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(unitChanged(int)));
|
||||
|
||||
|
||||
//
|
||||
// Garmin crap
|
||||
//
|
||||
|
||||
@@ -77,6 +77,7 @@ class GeneralPage : public QWidget
|
||||
qint32 saveClicked();
|
||||
|
||||
QString athleteWAS; // remember what we started with !
|
||||
QComboBox *unitCombo;
|
||||
|
||||
public slots:
|
||||
void browseWorkoutDir();
|
||||
@@ -98,8 +99,6 @@ class GeneralPage : public QWidget
|
||||
QLineEdit *workoutDirectory;
|
||||
QPushButton *workoutBrowseButton;
|
||||
QPushButton *athleteBrowseButton;
|
||||
QComboBox *unitCombo;
|
||||
|
||||
|
||||
QLabel *langLabel;
|
||||
QLabel *warningLabel;
|
||||
|
||||
Reference in New Issue
Block a user