Commit 8a3bc866 authored by Halla Rempt's avatar Halla Rempt

BUG:347798 Don't truncate fractional brush sizes on eraser switch

Patch by Alexey Elnatanov. Thanks!
CCMAIL: invalpoint@gmail.com
parent a71c6cdd
......@@ -839,7 +839,7 @@ void KisPaintopBox::slotToggleEraseMode(bool checked)
{
// remember brush size. set the eraser size to the normal brush size if not set
normalBrushSize = m_sliderChooser[0]->getWidget<KisDoubleSliderSpinBox>("size")->value();
if (!eraserBrushSize)
if (qFuzzyIsNull(eraserBrushSize))
eraserBrushSize = normalBrushSize;
}
else
......@@ -866,7 +866,7 @@ void KisPaintopBox::slotToggleEraseMode(bool checked)
//update value in UI (this is the main place the value is 'stored' in memory)
int updateSize = checked ? eraserBrushSize : normalBrushSize;
qreal updateSize = checked ? eraserBrushSize : normalBrushSize;
m_sliderChooser[0]->getWidget<KisDoubleSliderSpinBox>("size")->setValue(updateSize);
m_sliderChooser[1]->getWidget<KisDoubleSliderSpinBox>("size")->setValue(updateSize);
m_sliderChooser[2]->getWidget<KisDoubleSliderSpinBox>("size")->setValue(updateSize);
......
......@@ -197,8 +197,8 @@ private:
QString m_currCompositeOpID;
KisNodeWSP m_previousNode;
int normalBrushSize; // when toggling between eraser mode
int eraserBrushSize;
qreal normalBrushSize; // when toggling between eraser mode
qreal eraserBrushSize;
KisAction* m_hMirrorAction;
KisAction* m_vMirrorAction;
......
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