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()
}
else
{
//This removes directories that do not exist.
optionsDataDir.remove(optionsDataDirs.at(dir));
//This removes directories that do not exist from the list.
optionsDataDirs.removeAt(dir);
dir--;
updated = true;
}
......
......@@ -80,6 +80,8 @@ OptionsProfileEditor::OptionsProfileEditor(QWidget *parent, bool showSolveOption
astrometryOptions->setVisible(false);
connect(m_ConfigDialog->button(QDialogButtonBox::Apply), SIGNAL(clicked()), SLOT(slotApply()));
connect(m_ConfigDialog->button(QDialogButtonBox::Ok), SIGNAL(clicked()), SLOT(slotApply()));
loadOptionsProfile();
}
void OptionsProfileEditor::connectOptionsProfileComboBox()
......@@ -136,6 +138,7 @@ SSolver::Parameters OptionsProfileEditor::getSettingsFromUI()
{
SSolver::Parameters params;
params.listName = "Custom";
params.description = description->toPlainText();
//These are to pass the parameters to the internal sextractor
params.apertureShape = (SSolver::Shape) apertureShape->currentIndex();
params.kron_fact = kron_fact->text().toDouble();
......@@ -178,6 +181,8 @@ SSolver::Parameters OptionsProfileEditor::getSettingsFromUI()
void OptionsProfileEditor::sendSettingsToUI(SSolver::Parameters a)
{
description->setText(a.description);
//Sextractor Settings
apertureShape->setCurrentIndex(a.apertureShape);
......@@ -327,7 +332,7 @@ void OptionsProfileEditor::slotApply()
int index = optionsProfile->currentIndex();
SSolver::Parameters currentParams = getSettingsFromUI();
SSolver::Parameters savedParams = optionsList.at(index);
if(!(currentParams == savedParams))
if(!(currentParams == savedParams) || currentParams.description != savedParams.description)
{
currentParams.listName = savedParams.listName;
optionsList.replace(index, currentParams);
......
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>589</width>
<height>684</height>
<height>733</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
......@@ -119,6 +119,19 @@
</item>
</layout>
</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>
</widget>
</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