Commit 8679229b authored by László Fazekas's avatar László Fazekas

bug 375878 - Eraser will not switch back to brush after turning Wacom pen back around

Additional correction to solve this bug
parent 98a0c786
......@@ -583,7 +583,10 @@ void KisPaintopBox::setCurrentPaintop(KisPaintOpPresetSP preset)
//qDebug() << "setCurrentPaintop(); " << preset->name();
if (preset == m_resourceProvider->currentPreset()) {
return;
if (preset == m_tabletToolMap[m_currTabletToolID].preset) {
return;
}
}
Q_ASSERT(preset);
const KoID& paintop = preset->paintOp();
......@@ -754,6 +757,8 @@ void KisPaintopBox::slotInputDeviceChanged(const KoInputDevice& inputDevice)
//qDebug() << "slotInputDeviceChanged()" << inputDevice.device() << inputDevice.uniqueTabletId();
m_currTabletToolID = TabletToolID(inputDevice);
if (toolData == m_tabletToolMap.end()) {
KisConfig cfg;
KisPaintOpPresetResourceServer *rserver = KisResourceServerProvider::instance()->paintOpPresetServer(false);
......@@ -786,8 +791,6 @@ void KisPaintopBox::slotInputDeviceChanged(const KoInputDevice& inputDevice)
setCurrentPaintop(toolData->paintOpID);
}
}
m_currTabletToolID = TabletToolID(inputDevice);
}
void KisPaintopBox::slotCanvasResourceChanged(int key, const QVariant &value)
......
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