Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Tusooa Zhu
Krita
Commits
b69e8669
Commit
b69e8669
authored
Sep 18, 2014
by
Sven Langkamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
load old style favorite presets and add tags for the new system
parent
ab8f2ab3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
krita/ui/kis_favorite_resource_manager.cpp
krita/ui/kis_favorite_resource_manager.cpp
+16
-2
No files found.
krita/ui/kis_favorite_resource_manager.cpp
View file @
b69e8669
...
...
@@ -171,11 +171,25 @@ KisFavoriteResourceManager::KisFavoriteResourceManager(KisPaintopBox *paintopBox
KoResourceServer
<
KisPaintOpPreset
>*
rServer
=
KisResourceServerProvider
::
instance
()
->
paintOpPresetServer
();
rServer
->
addObserver
(
this
);
connect
(
KisConfigNotifier
::
instance
(),
SIGNAL
(
configChanged
()),
SLOT
(
updateFavoritePresets
()));
KConfigGroup
group
(
KGlobal
::
config
(),
"favoriteList"
);
QStringList
oldFavoritePresets
=
(
group
.
readEntry
(
"favoritePresets"
)).
split
(
','
,
QString
::
SkipEmptyParts
);
KisConfig
cfg
;
m_currentTag
=
cfg
.
readEntry
<
QString
>
(
"favoritePresetsTag"
,
QString
());
if
(
!
oldFavoritePresets
.
isEmpty
()
&&
m_currentTag
.
isEmpty
())
{
m_currentTag
=
i18n
(
"Favorite Presets"
);
foreach
(
const
QString
&
name
,
oldFavoritePresets
)
{
KisPaintOpPreset
*
preset
=
rServer
->
resourceByName
(
name
);
rServer
->
addTag
(
preset
,
m_currentTag
);
}
rServer
->
tagCategoryAdded
(
m_currentTag
);
cfg
.
writeEntry
<
QString
>
(
"favoritePresets"
,
QString
());
}
connect
(
KisConfigNotifier
::
instance
(),
SIGNAL
(
configChanged
()),
SLOT
(
updateFavoritePresets
()));
updateFavoritePresets
();
}
...
...
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