Fix storage of external editor icons

De-serialize and serialize icons instead of using their names.
This commit is contained in:
Lawrence Lee
2021-08-14 17:11:07 -07:00
parent d3e524a491
commit 672d6302f3
7 changed files with 75 additions and 31 deletions

View File

@@ -1793,7 +1793,7 @@ void Preferences::storePreferences()
moptions.externalEditorIndex = -1;
for (unsigned i = 0; i < editors.size(); i++) {
moptions.externalEditors[i] = (ExternalEditor(
editors[i].name, editors[i].command, editors[i].icon_name));
editors[i].name, editors[i].command, editors[i].icon_serialized));
if (editors[i].other_data) {
// The current editor was marked before the list was edited. We
// found the mark, so this is the editor that was active.
@@ -2100,7 +2100,7 @@ void Preferences::fillPreferences()
std::vector<ExternalEditorPreferences::EditorInfo> editorInfos;
for (const auto &editor : moptions.externalEditors) {
editorInfos.push_back(ExternalEditorPreferences::EditorInfo(
editor.name, editor.command, editor.icon_name));
editor.name, editor.command, editor.icon_serialized));
}
if (moptions.externalEditorIndex >= 0) {
// Mark the current editor so we can track it.