41 m_shortcutsEditor->clearSearch();
43 QString dialogText = i18n(
"The current shortcut scheme is modified. Save before switching to the new one?");
44 if (m_shortcutsEditor->isModified() &&
45 KMessageBox::questionTwoActions(q,
46 i18n(
"The current shortcut scheme is modified. Save before switching to the new one?"),
48 KStandardGuiItem::save(),
49 KStandardGuiItem::discard())
50 == KMessageBox::PrimaryAction) {
51 m_shortcutsEditor->save();
53 m_shortcutsEditor->undo();
56 KisCursorOverrideLock cursorLock(Qt::WaitCursor);
57 m_shortcutsEditor->clearCollections();
59 KConfigGroup cg = KSharedConfig::openConfig()->group(
"Shortcut Schemes");
60 cg.writeEntry(
"Current Scheme", schemeName);
65 auto it = m_collections.constBegin();
66 while (it != m_collections.constEnd()) {
67 it.value()->updateShortcuts();
69 m_shortcutsEditor->addCollection(it.value(), it.key());