[qet] [1935] Fixed a bug causing some settings to be saved under printer-related sections .

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 1935
Author:   xavier
Date:     2012-08-12 22:32:56 +0200 (Sun, 12 Aug 2012)
Log Message:
-----------
Fixed a bug causing some settings to be saved under printer-related sections.

Modified Paths:
--------------
    trunk/sources/diagramprintdialog.cpp

Modified: trunk/sources/diagramprintdialog.cpp
===================================================================
--- trunk/sources/diagramprintdialog.cpp	2012-08-12 20:32:55 UTC (rev 1934)
+++ trunk/sources/diagramprintdialog.cpp	2012-08-12 20:32:56 UTC (rev 1935)
@@ -557,7 +557,10 @@
 	
 	while (!settings.group().isEmpty()) settings.endGroup();
 	settings.beginGroup("printers");
-	if (!settings.childGroups().contains(printer_section)) return;
+	if (!settings.childGroups().contains(printer_section)) {
+		settings.endGroup();
+		return;
+	}
 	
 	settings.beginGroup(printer_section);
 	if (settings.contains("orientation")) {
@@ -588,6 +591,9 @@
 	}
 	printer_ -> setPageMargins(margins[0], margins[1], margins[2], margins[3], QPrinter::Millimeter);
 	printer_ -> setFullPage(settings.value("fullpage", "false").toString() == "true");
+	
+	settings.endGroup();
+	settings.endGroup();
 }
 
 /**


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/