Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Miguel Lopez
Krita
Commits
6f74f4a2
Commit
6f74f4a2
authored
May 01, 2014
by
Dan Leinir Turthra Jensen
🌈
Browse files
sketch: A bit of logic to ensure that preset memory in Sketch as well
parent
6555ba9b
Changes
3
Hide whitespace changes
Inline
Side-by-side
krita/sketch/Settings.cpp
View file @
6f74f4a2
...
...
@@ -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"
krita/sketch/Settings.h
View file @
6f74f4a2
...
...
@@ -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
;
...
...
krita/sketch/qml/panels/PresetsPanel.qml
View file @
6f74f4a2
...
...
@@ -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
;
// }
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment