]> git.sesse.net Git - kdenlive/blobdiff - src/beziercurve/beziersplinewidget.cpp
Use KLocalizedString (for i18n only, in kf5 it will necessary => use a script for...
[kdenlive] / src / beziercurve / beziersplinewidget.cpp
index e4d5a322cd4ee6aeb4487819315f724691f0d3f9..6f7683f818c1191cbdfca2db8eecc05e6609dc45 100644 (file)
@@ -24,7 +24,7 @@
 #include <QVBoxLayout>
 
 #include <KIcon>
-#include <KLocale>
+#include <KLocalizedString>
 
 
 BezierSplineWidget::BezierSplineWidget(const QString& spline, QWidget* parent) :
@@ -119,14 +119,16 @@ void BezierSplineWidget::slotGridChange()
 
 void BezierSplineWidget::slotShowPixmap(bool show)
 {
-    m_showPixmap = show;
-    KdenliveSettings::setBezier_showpixmap(show);
-    if (show && (int)m_mode < 6)
-        m_edit.setPixmap(QPixmap::fromImage(ColorTools::rgbCurvePlane(m_edit.size(), (ColorTools::ColorsRGB)((int)m_mode), 1, palette().background().color().rgb())));
-     else if (show && m_mode == ModeHue)
-         m_edit.setPixmap(QPixmap::fromImage(ColorTools::hsvCurvePlane(m_edit.size(), QColor::fromHsv(200, 200, 200), ColorTools::COM_H, ColorTools::COM_H)));
-    else
-        m_edit.setPixmap(QPixmap());
+    if (m_showPixmap != show) {
+        m_showPixmap = show;
+        KdenliveSettings::setBezier_showpixmap(show);
+        if (show && (int)m_mode < 6)
+            m_edit.setPixmap(QPixmap::fromImage(ColorTools::rgbCurvePlane(m_edit.size(), (ColorTools::ColorsRGB)((int)m_mode), 1, palette().background().color().rgb())));
+        else if (show && m_mode == ModeHue)
+            m_edit.setPixmap(QPixmap::fromImage(ColorTools::hsvCurvePlane(m_edit.size(), QColor::fromHsv(200, 200, 200), ColorTools::COM_H, ColorTools::COM_H)));
+        else
+            m_edit.setPixmap(QPixmap());
+    }
 }
 
 void BezierSplineWidget::slotUpdatePointEntries(const BPoint &p)