Load all resolutions upon model creation.
authorMohammed Sameer <msameer@foolab.org>
Sat, 22 Sep 2012 22:39:16 +0000 (01:39 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sat, 22 Sep 2012 22:39:16 +0000 (01:39 +0300)
If we don't do so then it becomes impossible to load all of them since m_aspectRatio
will be empty and the only way to load all them is to set the aspectRatio property
to an empty string.
The new property value and the stored one will always be equal in such case.

imports/imageresolutionmodel.cpp

index fde1448..47b16b0 100644 (file)
@@ -36,6 +36,8 @@ ImageResolutionModel::ImageResolutionModel(QtCamImageSettings *settings, QObject
   roles[AspectRatioRole] = "resolutionAspectRatio";
 
   setRoleNames(roles);
+
+  m_resolutions = m_settings->resolutions(m_aspectRatio);
 }
 
 ImageResolutionModel::~ImageResolutionModel() {