Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Miguel Lopez
Krita
Commits
7102a35d
Commit
7102a35d
authored
Jul 17, 2014
by
Halla Rempt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix importing resource bundles.
parent
46da7713
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
krita/plugins/extensions/resourcemanager/resourcemanager.cpp
krita/plugins/extensions/resourcemanager/resourcemanager.cpp
+11
-3
No files found.
krita/plugins/extensions/resourcemanager/resourcemanager.cpp
View file @
7102a35d
...
...
@@ -191,7 +191,7 @@ void ResourceManager::slotImport()
}
else
if
(
resourceType
==
"bundles"
)
{
foreach
(
const
QString
&
res
,
resources
)
{
ResourceBundle
*
bundle
=
new
Resource
Bundle
(
res
);
ResourceBundle
*
bundle
=
d
->
bundleServer
->
create
Resource
(
res
);
bundle
->
load
();
if
(
bundle
->
valid
())
{
if
(
!
bundle
->
install
())
{
...
...
@@ -202,9 +202,17 @@ void ResourceManager::slotImport()
QMessageBox
::
warning
(
0
,
"Krita"
,
i18n
(
"Could not load bundle %1."
).
arg
(
res
));
}
delete
bundle
;
QFileInfo
fi
(
res
);
QString
newFilename
=
d
->
bundleServer
->
saveLocation
()
+
fi
.
baseName
()
+
bundle
->
defaultFileExtension
();
QFileInfo
fileInfo
(
newFilename
);
//d->bundleServer->importResourceFile(res);
int
i
=
1
;
while
(
fileInfo
.
exists
())
{
fileInfo
.
setFile
(
d
->
bundleServer
->
saveLocation
()
+
fi
.
baseName
()
+
QString
(
"%1"
).
arg
(
i
)
+
bundle
->
defaultFileExtension
());
i
++
;
}
bundle
->
setFilename
(
fileInfo
.
filePath
());
QFile
::
copy
(
res
,
newFilename
);
}
}
else
if
(
resourceType
==
"patterns"
)
{
...
...
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