Skip to content

Commit

Permalink
[ui] Harmonize loop widget of 3D map view
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn authored and nyalldawson committed Jun 28, 2020
1 parent a16dfbd commit 6e63b82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/app/3d/qgs3danimationwidget.cpp
Expand Up @@ -40,7 +40,6 @@ Qgs3DAnimationWidget::Qgs3DAnimationWidget( QWidget *parent )
btnEditKeyframe->setIcon( QIcon( QgsApplication::iconPath( "symbologyEdit.svg" ) ) );
btnPlayPause->setIcon( QIcon( QgsApplication::iconPath( "mTaskRunning.svg" ) ) );
btnDuplicateKeyframe->setIcon( QIcon( QgsApplication::iconPath( "mActionEditCopy.svg" ) ) );
btnRepeat->setIcon( QIcon( QgsApplication::iconPath( "mActionRefresh.svg" ) ) );
btnExportAnimation->setIcon( QIcon( QgsApplication::iconPath( "mActionFileSave.svg" ) ) );
cboKeyframe->addItem( tr( "<none>" ) );

Expand All @@ -58,8 +57,6 @@ Qgs3DAnimationWidget::Qgs3DAnimationWidget( QWidget *parent )
btnPlayPause->setCheckable( true );
connect( btnPlayPause, &QToolButton::clicked, this, &Qgs3DAnimationWidget::onPlayPause );

btnRepeat->setCheckable( true );

connect( sliderTime, &QSlider::valueChanged, this, &Qgs3DAnimationWidget::onSliderValueChanged );

connect( cboKeyframe, qgis::overload<int>::of( &QComboBox::currentIndexChanged ), this, &Qgs3DAnimationWidget::onKeyframeChanged );
Expand Down Expand Up @@ -173,7 +170,7 @@ void Qgs3DAnimationWidget::onAnimationTimer()
{
if ( sliderTime->value() >= sliderTime->maximum() )
{
if ( btnRepeat->isChecked() )
if ( mLoopingCheckBox->isChecked() )
sliderTime->setValue( 0 );
else
{
Expand Down
6 changes: 3 additions & 3 deletions src/ui/3d/animation3dwidget.ui
Expand Up @@ -276,12 +276,12 @@
</widget>
</item>
<item>
<widget class="QToolButton" name="btnRepeat">
<widget class="QCheckBox" name="mLoopingCheckBox">
<property name="toolTip">
<string>Repeat</string>
<string>Automatically reset and repeat the animation endlessly</string>
</property>
<property name="text">
<string></string>
<string>Loop</string>
</property>
</widget>
</item>
Expand Down

0 comments on commit 6e63b82

Please sign in to comment.