Commit 47c89745 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Do not request transform preview update on changing liquify options

These options affect the brush settings only, not what the actual
visual representation is.

BUG:425712
parent 17f7be23
......@@ -1037,7 +1037,7 @@ void KisToolTransform::slotTrackerChangedConfig(KisToolChangesTrackerDataSP stat
*m_transaction.currentConfig() = *newArgs;
slotUiChangedConfig();
slotUiChangedConfig(true);
updateOptionWidget();
}
......@@ -1080,8 +1080,8 @@ QWidget* KisToolTransform::createOptionWidget()
m_optionsWidget->layout()->addWidget(specialSpacer);
connect(m_optionsWidget, SIGNAL(sigConfigChanged()),
this, SLOT(slotUiChangedConfig()));
connect(m_optionsWidget, SIGNAL(sigConfigChanged(bool)),
this, SLOT(slotUiChangedConfig(bool)));
connect(m_optionsWidget, SIGNAL(sigApplyTransform()),
this, SLOT(slotApplyTransform()));
......@@ -1142,11 +1142,13 @@ void KisToolTransform::updateApplyResetAvailability()
}
}
void KisToolTransform::slotUiChangedConfig()
void KisToolTransform::slotUiChangedConfig(bool needsPreviewRecalculation)
{
if (mode() == KisTool::PAINT_MODE) return;
currentStrategy()->externalConfigChanged();
if (needsPreviewRecalculation) {
currentStrategy()->externalConfigChanged();
}
if (m_currentArgs.mode() == ToolTransformArgs::LIQUIFY) {
m_currentArgs.saveLiquifyTransformMode();
......
......@@ -319,7 +319,7 @@ private:
private Q_SLOTS:
void slotTrackerChangedConfig(KisToolChangesTrackerDataSP status);
void slotUiChangedConfig();
void slotUiChangedConfig(bool needsPreviewRecalculation);
void slotApplyTransform();
void slotResetTransform(ToolTransformArgs::TransformMode mode);
void slotCancelTransform();
......
......@@ -396,7 +396,7 @@ void KisToolTransformConfigWidget::slotLiquifyModeChanged(int value)
updateLiquifyControls();
notifyConfigChanged();
notifyConfigChanged(false);
}
void KisToolTransformConfigWidget::liquifySizeChanged(qreal value)
......@@ -408,7 +408,7 @@ void KisToolTransformConfigWidget::liquifySizeChanged(qreal value)
config->liquifyProperties();
props->setSize(value);
notifyConfigChanged();
notifyConfigChanged(false);
}
void KisToolTransformConfigWidget::liquifyAmountChanged(qreal value)
......@@ -420,7 +420,7 @@ void KisToolTransformConfigWidget::liquifyAmountChanged(qreal value)
config->liquifyProperties();
props->setAmount(value);
notifyConfigChanged();
notifyConfigChanged(false);
}
void KisToolTransformConfigWidget::liquifyFlowChanged(qreal value)
......@@ -432,7 +432,7 @@ void KisToolTransformConfigWidget::liquifyFlowChanged(qreal value)
config->liquifyProperties();
props->setFlow(value);
notifyConfigChanged();
notifyConfigChanged(false);
}
void KisToolTransformConfigWidget::liquifyBuildUpChanged(int value)
......@@ -445,7 +445,7 @@ void KisToolTransformConfigWidget::liquifyBuildUpChanged(int value)
props->setUseWashMode(value); // 0 == build up mode / 1 == wash mode
notifyConfigChanged();
notifyConfigChanged(false);
// we need to enable/disable flow slider
updateLiquifyControls();
......@@ -460,7 +460,7 @@ void KisToolTransformConfigWidget::liquifySpacingChanged(qreal value)
config->liquifyProperties();
props->setSpacing(value);
notifyConfigChanged();
notifyConfigChanged(false);
}
void KisToolTransformConfigWidget::liquifySizePressureChanged(bool value)
......@@ -472,7 +472,7 @@ void KisToolTransformConfigWidget::liquifySizePressureChanged(bool value)
config->liquifyProperties();
props->setSizeHasPressure(value);
notifyConfigChanged();
notifyConfigChanged(false);
}
void KisToolTransformConfigWidget::liquifyAmountPressureChanged(bool value)
......@@ -484,7 +484,7 @@ void KisToolTransformConfigWidget::liquifyAmountPressureChanged(bool value)
config->liquifyProperties();
props->setAmountHasPressure(value);
notifyConfigChanged();
notifyConfigChanged(false);
}
void KisToolTransformConfigWidget::liquifyReverseDirectionChanged(bool value)
......@@ -496,7 +496,7 @@ void KisToolTransformConfigWidget::liquifyReverseDirectionChanged(bool value)
config->liquifyProperties();
props->setReverseDirection(value);
notifyConfigChanged();
notifyConfigChanged(false);
}
void KisToolTransformConfigWidget::updateConfig(const ToolTransformArgs &config)
......@@ -690,10 +690,10 @@ void KisToolTransformConfigWidget::unblockNotifications()
m_notificationsBlocked--;
}
void KisToolTransformConfigWidget::notifyConfigChanged()
void KisToolTransformConfigWidget::notifyConfigChanged(bool needsPreviewRecalculation)
{
if (!m_notificationsBlocked) {
emit sigConfigChanged();
emit sigConfigChanged(needsPreviewRecalculation);
}
m_configChanged = true;
}
......
......@@ -31,7 +31,7 @@ public Q_SLOTS:
void slotUpdateIcons();
Q_SIGNALS:
void sigConfigChanged();
void sigConfigChanged(bool needsPreviewRecalculation);
void sigApplyTransform();
void sigResetTransform(ToolTransformArgs::TransformMode mode);
void sigCancelTransform();
......@@ -114,7 +114,7 @@ private:
void blockNotifications();
void unblockNotifications();
void notifyConfigChanged();
void notifyConfigChanged(bool needsPreviewRecalculation = true);
void blockUiSlots();
void unblockUiSlots();
......
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