Commit c1bdfaf4 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke
Browse files

Fixing SnapshotiDialog issue with "Keep Aspect" checkbox.

If the "Keep Aspect" checkbox is checked upon dialog initialization, the height
spinbox is now updated immediately. Prior to this fix it was necessary to
uncheck and recheck the "Keep Aspect" checkbox.

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6fe6bed6
......@@ -75,6 +75,10 @@ SnapshotDialog::SnapshotDialog(QString _suggest, bool _captureViewers, int _w, i
// Load button states
if (keepAspect->isChecked()) {
snapHeight->setValue((int)((double)snapWidth->value() / aspect_));
connect(snapWidth, SIGNAL(valueChanged(int)), this, SLOT(snapWidthChanged(int)) );
connect(snapHeight, SIGNAL(valueChanged(int)), this, SLOT(snapHeightChanged(int)) );
connect(keepAspect, SIGNAL(stateChanged(int)), this, SLOT(keepAspectChanged()) );
......@@ -136,7 +140,7 @@ void SnapshotDialog::keepAspectChanged() {
if(keepAspect->isChecked()) {
blockSpinBox_ = true;
snapHeight->setValue((int)((double)snapWidth->value() / aspect_));
snapHeight->setValue((int)((double)snapWidth->value() / aspect_));
blockSpinBox_ = false;
......@@ -146,7 +146,7 @@
<widget class="QWidget" name="widget_2" native="true">
<widget class="QWidget" name="changeRes_wdgt" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="margin">
......@@ -165,7 +165,7 @@
<widget class="QPushButton" name="resButton">
<widget class="QPushButton" name="changeRes_pb">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
......@@ -419,7 +419,7 @@ Allowed values: any number between 2 and 16.</string>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment