Skip to content

Commit

Permalink
Some minor cleaning up.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Jun 27, 2017
1 parent bfda24d commit cb24cb3
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions src/plugins/simulation/PendulumWindow/src/pendulumwindowwindow.cpp
Expand Up @@ -419,11 +419,6 @@ void PendulumWindowWindow::initData(const int &pDataSize,

void PendulumWindowWindow::addData(const int &pCurrentDataSize)
{
// Make sure that we have a valid field module

if (!mFieldModule.isValid())
return;

// Assign the time-varying parameters for mR0, mQ1 and mTheta

mFieldModule.beginChange();
Expand Down Expand Up @@ -484,13 +479,11 @@ void PendulumWindowWindow::updateScene(const int &pTime)
{
// Update our scene

if (mTimeKeeper.isValid()) {
double time = 0.01*pTime;
double time = 0.01*pTime;

mTimeLabel->setText(tr("Time: %1 s").arg(time));
mTimeLabel->setText(tr("Time: %1 s").arg(time));

mTimeKeeper.setTime(time);
}
mTimeKeeper.setTime(time);
}

//==============================================================================
Expand All @@ -499,16 +492,14 @@ void PendulumWindowWindow::updateScene()
{
// Update our scene

if (mTimeKeeper.isValid()) {
int value = mTimeSlider->value();
int value = mTimeSlider->value();

if (value == mTimeSlider->maximum())
value = 0;
else
++value;
if (value == mTimeSlider->maximum())
value = 0;
else
++value;

mTimeSlider->setValue(value);
}
mTimeSlider->setValue(value);
}

//==============================================================================
Expand Down

0 comments on commit cb24cb3

Please sign in to comment.