summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-01-12 16:22:42 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-01-12 16:23:08 +0100
commit6d6d15e1b328ec5c0469f8bc142848715b1491e8 (patch)
treefd2e70a330979b94b205f79b80c4cc140322cfbe
parentad708b8a8a2c8d2d898c79823672aba79de7733e (diff)
fix qfc display artifacts & bugs
-rw-r--r--facetracknoir/ftnoir_curves.ui48
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.cpp13
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.h1
3 files changed, 31 insertions, 31 deletions
diff --git a/facetracknoir/ftnoir_curves.ui b/facetracknoir/ftnoir_curves.ui
index 04ff7887..195083b9 100644
--- a/facetracknoir/ftnoir_curves.ui
+++ b/facetracknoir/ftnoir_curves.ui
@@ -50,8 +50,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>921</width>
- <height>240</height>
+ <width>930</width>
+ <height>260</height>
</rect>
</property>
<property name="maxInputEGU" stdset="0">
@@ -96,8 +96,8 @@
<rect>
<x>0</x>
<y>300</y>
- <width>975</width>
- <height>206</height>
+ <width>930</width>
+ <height>260</height>
</rect>
</property>
<property name="maxInputEGU" stdset="0">
@@ -134,8 +134,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>595</width>
- <height>240</height>
+ <width>930</width>
+ <height>260</height>
</rect>
</property>
<property name="maxInputEGU" stdset="0">
@@ -183,8 +183,8 @@
<rect>
<x>0</x>
<y>300</y>
- <width>1013</width>
- <height>240</height>
+ <width>930</width>
+ <height>260</height>
</rect>
</property>
<property name="maxInputEGU" stdset="0">
@@ -224,8 +224,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>595</width>
- <height>240</height>
+ <width>930</width>
+ <height>260</height>
</rect>
</property>
<property name="maxInputEGU" stdset="0">
@@ -273,8 +273,8 @@
<rect>
<x>0</x>
<y>300</y>
- <width>595</width>
- <height>240</height>
+ <width>930</width>
+ <height>260</height>
</rect>
</property>
<property name="maxInputEGU" stdset="0">
@@ -314,8 +314,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>555</width>
- <height>160</height>
+ <width>930</width>
+ <height>260</height>
</rect>
</property>
<property name="maxInputEGU" stdset="0">
@@ -363,8 +363,8 @@
<rect>
<x>0</x>
<y>300</y>
- <width>555</width>
- <height>160</height>
+ <width>930</width>
+ <height>260</height>
</rect>
</property>
<property name="maxInputEGU" stdset="0">
@@ -404,8 +404,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>555</width>
- <height>160</height>
+ <width>930</width>
+ <height>260</height>
</rect>
</property>
<property name="maxInputEGU" stdset="0">
@@ -453,8 +453,8 @@
<rect>
<x>0</x>
<y>300</y>
- <width>555</width>
- <height>160</height>
+ <width>930</width>
+ <height>260</height>
</rect>
</property>
<property name="maxInputEGU" stdset="0">
@@ -494,8 +494,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>555</width>
- <height>160</height>
+ <width>930</width>
+ <height>260</height>
</rect>
</property>
<property name="maxInputEGU" stdset="0">
@@ -543,8 +543,8 @@
<rect>
<x>0</x>
<y>300</y>
- <width>555</width>
- <height>160</height>
+ <width>930</width>
+ <height>260</height>
</rect>
</property>
<property name="maxInputEGU" stdset="0">
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp
index 755e2f9c..6540e66f 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.cpp
+++ b/qfunctionconfigurator/qfunctionconfigurator.cpp
@@ -44,7 +44,8 @@ void QFunctionConfigurator::setConfig(FunctionConfig* config, QString settingsFi
config->loadSettings(iniFile);
_config = config;
_draw_function = _draw_background = true;
- this->update();
+ update_range();
+ update();
}
void QFunctionConfigurator::loadSettings(QString settingsFile) {
@@ -87,7 +88,7 @@ void QFunctionConfigurator::drawBackground()
// horizontal grid
- for (int i = 0; i < maxx; i += xstep)
+ for (int i = 0; i < maxy; i += xstep)
{
double y = range.height() - i * c.y() + range.y();
drawLine(&painter,
@@ -102,7 +103,7 @@ void QFunctionConfigurator::drawBackground()
}
{
- const int i = maxx;
+ const int i = maxy;
double y = range.height() - i * c.y() + range.y();
drawLine(&painter,
QPointF(range.x(), y),
@@ -117,7 +118,7 @@ void QFunctionConfigurator::drawBackground()
// vertical grid
- for (int i = 0; i < maxy; i += ystep)
+ for (int i = 0; i < maxx; i += ystep)
{
double x = range.x() + i * c.x();
drawLine(&painter,
@@ -132,7 +133,7 @@ void QFunctionConfigurator::drawBackground()
text);
}
{
- const int i = maxy;
+ const int i = maxx;
double x = range.x() + i * c.x();
drawLine(&painter,
QPointF(x, range.y()),
@@ -415,8 +416,6 @@ void QFunctionConfigurator::setColorBezier(QColor color)
void QFunctionConfigurator::resizeEvent(QResizeEvent *)
{
- _draw_background = true;
- _draw_function = true;
update_range();
repaint();
}
diff --git a/qfunctionconfigurator/qfunctionconfigurator.h b/qfunctionconfigurator/qfunctionconfigurator.h
index 17cb3a44..bb2aced0 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.h
+++ b/qfunctionconfigurator/qfunctionconfigurator.h
@@ -68,6 +68,7 @@ private:
const double mwr = 15, mhr = 35;
range = QRectF(mwl, mhl, (w - mwl - mwr), (h - mhl - mhr));
c = QPointF(range.width() / _config->maxInput(), range.height() / _config->maxOutput());
+ _draw_function = _draw_background = true;
}
QRectF range; // The actual rectangle for the Bezier-curve