Commit c7ddf47b authored by Robert Lancaster's avatar Robert Lancaster

Fixing a bug in the getAstrometryDataDirs function. Adding descriptions

for the profiles
parent 541de8aa
...@@ -1488,8 +1488,8 @@ QStringList getAstrometryDataDirs() ...@@ -1488,8 +1488,8 @@ QStringList getAstrometryDataDirs()
} }
else else
{ {
//This removes directories that do not exist. //This removes directories that do not exist from the list.
optionsDataDir.remove(optionsDataDirs.at(dir)); optionsDataDirs.removeAt(dir);
dir--; dir--;
updated = true; updated = true;
} }
......
...@@ -80,6 +80,8 @@ OptionsProfileEditor::OptionsProfileEditor(QWidget *parent, bool showSolveOption ...@@ -80,6 +80,8 @@ OptionsProfileEditor::OptionsProfileEditor(QWidget *parent, bool showSolveOption
astrometryOptions->setVisible(false); astrometryOptions->setVisible(false);
connect(m_ConfigDialog->button(QDialogButtonBox::Apply), SIGNAL(clicked()), SLOT(slotApply())); connect(m_ConfigDialog->button(QDialogButtonBox::Apply), SIGNAL(clicked()), SLOT(slotApply()));
connect(m_ConfigDialog->button(QDialogButtonBox::Ok), SIGNAL(clicked()), SLOT(slotApply())); connect(m_ConfigDialog->button(QDialogButtonBox::Ok), SIGNAL(clicked()), SLOT(slotApply()));
loadOptionsProfile();
} }
void OptionsProfileEditor::connectOptionsProfileComboBox() void OptionsProfileEditor::connectOptionsProfileComboBox()
...@@ -136,6 +138,7 @@ SSolver::Parameters OptionsProfileEditor::getSettingsFromUI() ...@@ -136,6 +138,7 @@ SSolver::Parameters OptionsProfileEditor::getSettingsFromUI()
{ {
SSolver::Parameters params; SSolver::Parameters params;
params.listName = "Custom"; params.listName = "Custom";
params.description = description->toPlainText();
//These are to pass the parameters to the internal sextractor //These are to pass the parameters to the internal sextractor
params.apertureShape = (SSolver::Shape) apertureShape->currentIndex(); params.apertureShape = (SSolver::Shape) apertureShape->currentIndex();
params.kron_fact = kron_fact->text().toDouble(); params.kron_fact = kron_fact->text().toDouble();
...@@ -178,6 +181,8 @@ SSolver::Parameters OptionsProfileEditor::getSettingsFromUI() ...@@ -178,6 +181,8 @@ SSolver::Parameters OptionsProfileEditor::getSettingsFromUI()
void OptionsProfileEditor::sendSettingsToUI(SSolver::Parameters a) void OptionsProfileEditor::sendSettingsToUI(SSolver::Parameters a)
{ {
description->setText(a.description);
//Sextractor Settings //Sextractor Settings
apertureShape->setCurrentIndex(a.apertureShape); apertureShape->setCurrentIndex(a.apertureShape);
...@@ -327,7 +332,7 @@ void OptionsProfileEditor::slotApply() ...@@ -327,7 +332,7 @@ void OptionsProfileEditor::slotApply()
int index = optionsProfile->currentIndex(); int index = optionsProfile->currentIndex();
SSolver::Parameters currentParams = getSettingsFromUI(); SSolver::Parameters currentParams = getSettingsFromUI();
SSolver::Parameters savedParams = optionsList.at(index); SSolver::Parameters savedParams = optionsList.at(index);
if(!(currentParams == savedParams)) if(!(currentParams == savedParams) || currentParams.description != savedParams.description)
{ {
currentParams.listName = savedParams.listName; currentParams.listName = savedParams.listName;
optionsList.replace(index, currentParams); optionsList.replace(index, currentParams);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>589</width> <width>589</width>
<height>684</height> <height>733</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
...@@ -119,6 +119,19 @@ ...@@ -119,6 +119,19 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QTextEdit" name="description">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="toolTip">
<string>Description of the selected profile</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment