Emit aspectRatioChanged() after we populate the model with new resolutions.
authorMohammed Sameer <msameer@foolab.org>
Thu, 14 Feb 2013 00:19:38 +0000 (02:19 +0200)
committerMohammed Sameer <msameer@foolab.org>
Thu, 14 Feb 2013 00:19:38 +0000 (02:19 +0200)
This allows us to avoid creating all buttons then recreating them
after setting aspect ratio upon the construction of settings dialog

declarative/imageresolutionmodel.cpp

index 4ba775e..d0e0b19 100644 (file)
@@ -98,12 +98,12 @@ void ImageResolutionModel::setAspectRatio(const QString& aspectRatio) {
 
     m_aspectRatio = aspectRatio;
 
-    emit aspectRatioChanged();
-
     beginResetModel();
 
     m_resolutions = m_settings->resolutions(m_aspectRatio);
 
     endResetModel();
+
+    emit aspectRatioChanged();
   }
 }