zz_configDialog.cpp

changeset 174
963697b36118
parent 173
2368e3c23ef3
child 175
b094d5e9d6e0
--- a/zz_configDialog.cpp	Tue May 07 16:12:15 2013 +0300
+++ b/zz_configDialog.cpp	Tue May 07 17:51:10 2013 +0300
@@ -338,6 +338,7 @@
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 // =============================================================================
 extern_cfg (str, prog_ytruder);
+extern_cfg (str, prog_rectifier);
 static const struct extProgInfo {
 	const char* const name, *iconname;
 	strconfig* const path;
@@ -345,13 +346,14 @@
 	mutable QPushButton* setPathButton;
 } g_extProgInfo[] = {
 	{ "Ytruder", "ytruder", &prog_ytruder, null, null },
+	{ "Rectifier", "rectifier", &prog_rectifier, null, null },
 };
 
 void ConfigDialog::initExtProgTab () {
 	QWidget* tab = new QWidget;
 	QGridLayout* pathsLayout = new QGridLayout;
 	QGroupBox* pathsBox = new QGroupBox ("Paths", this);
-	QVBoxLayout* layout = new QVBoxLayout;
+	QVBoxLayout* layout = new QVBoxLayout (this);
 	
 	ulong row = 0;
 	for (const extProgInfo& info : g_extProgInfo) {
@@ -372,6 +374,7 @@
 		pathsLayout->addWidget (progLabel, row, 1);
 		pathsLayout->addWidget (input, row, 2);
 		pathsLayout->addWidget (setPathButton, row, 3);
+		++row;
 	}
 	
 	pathsBox->setLayout (pathsLayout);
@@ -460,7 +463,7 @@
 			idx = quickColorItems.size();
 		
 		quickColorMeta.insert (quickColorMeta.begin() + idx, entry);
-		entry = &quickColorMeta[idx];
+		entry = quickColorMeta[idx];
 	}
 	
 	updateQuickColorList (entry);
@@ -732,6 +735,10 @@
 			for (int j = 0; j < 4; ++j)
 				g_GridInfo[i].confs[j]->value = dlg.dsb_gridData[i][j]->value ();
 		
+		// Ext program settings
+		for (const extProgInfo& info : g_extProgInfo)
+			*info.path = info.input->text ();
+		
 		// Save the config
 		config::save ();
 		

mercurial