Commit 9f984137 authored by Dan Leinir Turthra Jensen's avatar Dan Leinir Turthra Jensen 🌈

Work around an issue where gemini would not store its shortcut settings right

parent 85586245
......@@ -488,7 +488,21 @@ KisView2::~KisView2()
m_d->filterManager->cancel();
}
{
// The reason for this is to ensure the shortcuts are saved at the right time,
// and only the right shortcuts. Gemini has two views at all times, and shortcuts
// must be handled by the desktopview, but if we use the logic as below, we
// overwrite the desktop view's settings with the sketch view's
if(qApp->applicationName() == QLatin1String("kritagemini")) {
KConfigGroup group(KGlobal::config(), "krita/shortcuts");
foreach(KActionCollection *collection, KActionCollection::allCollections()) {
const QObject* obj = dynamic_cast<const QObject*>(collection->parentGUIClient());
if(obj && qobject_cast<const KisView2*>(obj) && !obj->objectName().startsWith("view_0"))
break;
collection->setConfigGroup("krita/shortcuts");
collection->writeSettings(&group);
}
}
else {
KConfigGroup group(KGlobal::config(), "krita/shortcuts");
foreach(KActionCollection *collection, KActionCollection::allCollections()) {
collection->setConfigGroup("krita/shortcuts");
......
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