Changeset View
Changeset View
Standalone View
Standalone View
src/dialogs/katedialogs.cpp
Show First 20 Lines • Show All 1237 Lines • ▼ Show 20 Line(s) | 1235 | { | |||
---|---|---|---|---|---|
1238 | if (dictionary.isEmpty()) { | 1238 | if (dictionary.isEmpty()) { | ||
1239 | dictionary = Sonnet::Speller().defaultLanguage(); | 1239 | dictionary = Sonnet::Speller().defaultLanguage(); | ||
1240 | } | 1240 | } | ||
1241 | m_dictionaryComboBox->setCurrentByDictionary(dictionary); | 1241 | m_dictionaryComboBox->setCurrentByDictionary(dictionary); | ||
1242 | } | 1242 | } | ||
1243 | 1243 | | |||
1244 | void KateDictionaryBar::dictionaryChanged(const QString &dictionary) | 1244 | void KateDictionaryBar::dictionaryChanged(const QString &dictionary) | ||
1245 | { | 1245 | { | ||
1246 | KTextEditor::Range selection = m_view->selectionRange(); | 1246 | const KTextEditor::Range selection = m_view->selectionRange(); | ||
1247 | if (selection.isValid() && !selection.isEmpty()) { | 1247 | if (selection.isValid() && !selection.isEmpty()) { | ||
1248 | m_view->doc()->setDictionary(dictionary, selection); | 1248 | const bool blockmode = m_view->blockSelection(); | ||
1249 | m_view->doc()->setDictionary(dictionary, selection, blockmode); | ||||
1249 | } else { | 1250 | } else { | ||
1250 | m_view->doc()->setDefaultDictionary(dictionary); | 1251 | m_view->doc()->setDefaultDictionary(dictionary); | ||
1251 | } | 1252 | } | ||
1252 | } | 1253 | } | ||
1253 | 1254 | | |||
1254 | //END KateGotoBar | 1255 | //END KateGotoBar | ||
1255 | 1256 | | |||
1256 | //BEGIN KateModOnHdPrompt | 1257 | //BEGIN KateModOnHdPrompt | ||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |