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

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: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20956 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6fe6bed6
......@@ -75,6 +75,10 @@ SnapshotDialog::SnapshotDialog(QString _suggest, bool _captureViewers, int _w, i
// Load button states
loadStates();
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 @@
</layout>
</item>
<item>
<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">
<number>0</number>
......@@ -165,7 +165,7 @@
</spacer>
</item>
<item>
<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;http://www.w3.org/TR/REC-html40/strict.dtd&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>
<tabstop>snapWidth</tabstop>
<tabstop>snapHeight</tabstop>
<tabstop>keepAspect</tabstop>
<tabstop>resButton</tabstop>
<tabstop>changeRes_pb</tabstop>
<tabstop>transparent</tabstop>
<tabstop>hideCoordsys</tabstop>
<tabstop>multisampling</tabstop>
......
Markdown is supported
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