Commit f703e306 authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

Fix saving per-stylus item.

parent ac35d0e9
......@@ -518,10 +518,10 @@ KisPaintopBox::~KisPaintopBox()
while (iter.hasNext()) {
iter.next();
if ((iter.key().pointer) == QTabletEvent::Eraser) {
cfg.writeEntry(QString("LastEraser") , iter.value().preset->name());
cfg.writeEntry(QString("LastEraser_%1").arg(iter.key().uniqueTabletId), iter.value().preset->name());
}
else {
cfg.writeEntry(QString("LastPreset"), iter.value().preset->name());
cfg.writeEntry(QString("LastPreset_%1").arg(iter.key().uniqueTabletId), iter.value().preset->name());
}
}
// Do not delete the widget, since it is global to the application, not owned by the view
......
......@@ -220,6 +220,7 @@ private:
if (dev.pointer() == QTabletEvent::Eraser) {
pointer = QTabletEvent::Eraser;
}
uniqueTabletId = dev.uniqueTabletId();
}
bool operator == (const TabletToolID& id) const {
......@@ -231,6 +232,7 @@ private:
}
QTabletEvent::PointerType pointer;
qint64 uniqueTabletId;
};
struct TabletToolData {
......
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