diff align/Align.cpp @ 785:e136dd3bb5c6

Permit setting the default alignment preference
author Chris Cannam
date Wed, 05 Aug 2020 16:05:51 +0100
parents b651dc5ff555
children
line wrap: on
line diff
--- a/align/Align.cpp	Thu Jul 23 17:24:16 2020 +0100
+++ b/align/Align.cpp	Wed Aug 05 16:05:51 2020 +0100
@@ -250,6 +250,18 @@
 }
 
 void
+Align::setDefaultAlignmentPreference(AlignmentType type)
+{
+    QSettings settings;
+    settings.beginGroup("Alignment");
+    if (!settings.contains("alignment-type")) {
+        QString tag = getAlignmentTypeTag(type);
+        settings.setValue("alignment-type", tag);
+    }
+    settings.endGroup();
+}
+
+void
 Align::setPreferredAlignmentProgram(QString program)
 {
     QSettings settings;