[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    [calligra/calligra/2.9] krita/ui: Fix Loading assistants.
From:       Wolthera van Hovell <griffinvalley () gmail ! com>
Date:       2014-12-11 13:34:44
Message-ID: E1Xz3tE-00023h-AP () scm ! kde ! org
[Download RAW message or body]

Git commit 053d0d35ca927dbb3caf27ee180a430aaf8789f8 by Wolthera van Hovell.
Committed on 10/12/2014 at 21:00.
Pushed by woltherav into branch 'calligra/2.9'.

Fix Loading assistants.

Caused by assistant files being automatically named, but the paths that
point to them not.
This would cause crashes when clicking assistants.
This does not work backwardly.

To fix:
1. Open .kra as zip.
2. Open maindoc.xml in notepad or other simple text editor.
3. Find the assistant element.
4. Replace all underscores with spaces in attribute filename:
<assistant type="vanishing point"
filename="vanishing_point0.assistant"/>
becomes
<assistant type="vanishing point" filename="vanishing
point0.assistant"/>
5. save, confirm saving in zip.
6. Open and enjoy.

My sincere apologies this happened, I did not expect there to be two
different methods for the same string.
todo: Actually use same kind of method.

CCMAIL:kimageshop@kde.org

M  +3    -3    krita/ui/kis_painting_assistant.cc

http://commits.kde.org/calligra/053d0d35ca927dbb3caf27ee180a430aaf8789f8

diff --git a/krita/ui/kis_painting_assistant.cc b/krita/ui/kis_painting_assistant.cc
index 301e010..f7f7143 100644
--- a/krita/ui/kis_painting_assistant.cc
+++ b/krita/ui/kis_painting_assistant.cc
@@ -397,19 +397,19 @@ void KisPaintingAssistant::saveXmlList(QDomDocument& doc, QDomElement& assistant
     else if (d->id == "vanishing point"){
         QDomElement assistantElement = doc.createElement("assistant");
         assistantElement.setAttribute("type", "vanishing point");
-        assistantElement.setAttribute("filename", QString("vanishing_point%1.assistant").arg(count));
+        assistantElement.setAttribute("filename", QString("vanishing point%1.assistant").arg(count));
         assistantsElement.appendChild(assistantElement);
     }
     else if (d->id == "infinite ruler"){
         QDomElement assistantElement = doc.createElement("assistant");
         assistantElement.setAttribute("type", "infinite ruler");
-        assistantElement.setAttribute("filename", QString("infinite_rulers%1.assistant").arg(count));
+        assistantElement.setAttribute("filename", QString("infinite ruler%1.assistant").arg(count));
         assistantsElement.appendChild(assistantElement);
     }
     else if (d->id == "parallel ruler"){
         QDomElement assistantElement = doc.createElement("assistant");
         assistantElement.setAttribute("type", "parallel ruler");
-        assistantElement.setAttribute("filename", QString("parallel_ruler%1.assistant").arg(count));
+        assistantElement.setAttribute("filename", QString("parallel ruler%1.assistant").arg(count));
         assistantsElement.appendChild(assistantElement);
     }
     else if (d->id == "ruler"){
_______________________________________________
Krita mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic