Commit 6f74f4a2 authored by Dan Leinir Turthra Jensen's avatar Dan Leinir Turthra Jensen 🌈
Browse files

sketch: A bit of logic to ensure that preset memory in Sketch as well

parent 6555ba9b
......@@ -135,4 +135,10 @@ QObject* Settings::customImageSettings() const
return settings;
}
QString Settings::lastPreset() const
{
KisConfig cfg;
return cfg.readEntry("LastPreset", QString("Basic_tip_default"));
}
#include "Settings.moc"
......@@ -36,6 +36,7 @@ class KRITA_SKETCH_EXPORT Settings : public QObject
Q_PROPERTY(QObject* theme READ theme NOTIFY themeChanged)
Q_PROPERTY(QString themeID READ themeID WRITE setThemeID NOTIFY themeChanged)
Q_PROPERTY(QObject* customImageSettings READ customImageSettings NOTIFY customImageSettingsChanged)
Q_PROPERTY(QString lastPreset READ lastPreset NOTIFY lastPresetChanged)
public:
explicit Settings( QObject* parent = 0);
......@@ -59,6 +60,7 @@ public Q_SLOTS:
void setThemeID(const QString& id);
QObject* customImageSettings() const;
QString lastPreset() const;
Q_SIGNALS:
void currentFileChanged();
......@@ -66,6 +68,7 @@ Q_SIGNALS:
void focusItemChanged();
void themeChanged();
void customImageSettingsChanged();
void lastPresetChanged();
private:
class Private;
......
......@@ -103,7 +103,7 @@ Panel {
// if (window.applicationName === undefined) {
if(toolManager.currentTool === null)
toolManager.requestToolChange("KritaShape/KisToolBrush");
presetsModel.currentPreset = "Basic circle";
presetsModel.currentPreset = Settings.lastPreset;
// }
}
}
......
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