Merge branch 'dev' into metadata-exiv2
This commit is contained in:
@@ -1779,8 +1779,8 @@ 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_serialized));
|
||||
if (editors[i].other_data) {
|
||||
editors[i].name, editors[i].command, editors[i].native_command, editors[i].icon_serialized));
|
||||
if (editors[i].other_data.selected) {
|
||||
// The current editor was marked before the list was edited. We
|
||||
// found the mark, so this is the editor that was active.
|
||||
moptions.externalEditorIndex = i;
|
||||
@@ -2064,12 +2064,11 @@ 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_serialized));
|
||||
editorInfos.emplace_back(editor.name, editor.command, editor.icon_serialized, editor.native_command);
|
||||
}
|
||||
if (moptions.externalEditorIndex >= 0) {
|
||||
// Mark the current editor so we can track it.
|
||||
editorInfos[moptions.externalEditorIndex].other_data = (void *)1;
|
||||
editorInfos[moptions.externalEditorIndex].other_data.selected = true;
|
||||
}
|
||||
externalEditors->setEditors(editorInfos);
|
||||
|
||||
@@ -2569,7 +2568,10 @@ void Preferences::workflowUpdate()
|
||||
}
|
||||
if (changed) {
|
||||
// Update the send to external editor widget.
|
||||
parent->updateExternalEditorWidget(moptions.externalEditorIndex, moptions.externalEditors);
|
||||
int selected_index = moptions.externalEditorIndex >= 0
|
||||
? moptions.externalEditorIndex
|
||||
: static_cast<int>(moptions.externalEditors.size());
|
||||
parent->updateExternalEditorWidget(selected_index, moptions.externalEditors);
|
||||
}
|
||||
|
||||
if (moptions.cloneFavoriteTools != options.cloneFavoriteTools ||
|
||||
|
Reference in New Issue
Block a user