From d5937c6d711c0626f199bcbcf9fbc01566b7c87f Mon Sep 17 00:00:00 2001 From: mgr Date: Fri, 23 Jul 2021 20:06:33 +0200 Subject: [PATCH] Automatic editor mode: change default for SVG to Image Viewer This will give precedence to viewing SVG images over editing them as XML. I suppose it makes sense, because most users will load images from disk or using an application and will generally want to view them and not editing them. This also makes more sense for 4e5f117851faad03923c99767db1aad63e818439 --- src/EditDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EditDialog.cpp b/src/EditDialog.cpp index b68d3e86..b226ce0f 100644 --- a/src/EditDialog.cpp +++ b/src/EditDialog.cpp @@ -1011,6 +1011,7 @@ void EditDialog::switchEditorMode(bool autoSwitchForType) // Switch automatically the editing mode according to the detected data. switch (dataType) { case Image: + case SVG: ui->comboMode->setCurrentIndex(ImageEditor); break; case Binary: @@ -1026,7 +1027,6 @@ void EditDialog::switchEditorMode(bool autoSwitchForType) case JSON: ui->comboMode->setCurrentIndex(JsonEditor); break; - case SVG: case XML: ui->comboMode->setCurrentIndex(XmlEditor); break;