SearchDialog.cpp   SearchDialog.cpp 
skipping to change at line 338 skipping to change at line 338
{ {
simbadReply = simbadSearcher->lookup(simbadServerUrl , trimmedText, 3); simbadReply = simbadSearcher->lookup(simbadServerUrl , trimmedText, 3);
onSimbadStatusChanged(); onSimbadStatusChanged();
connect(simbadReply, SIGNAL(statusChanged()), this, SLOT(onSimbadStatusChanged())); connect(simbadReply, SIGNAL(statusChanged()), this, SLOT(onSimbadStatusChanged()));
} }
QString greekText = substituteGreek(trimmedText); QString greekText = substituteGreek(trimmedText);
QStringList matches; QStringList matches;
if(greekText != trimmedText) { if(greekText != trimmedText) {
matches = objectMgr->listMatchingObjectsI18n(trimmed Text, 3); matches = objectMgr->listMatchingObjectsI18n(trimmed Text, 3);
matches += objectMgr->listMatchingObjects(trimmedTex t, 3);
matches += objectMgr->listMatchingObjectsI18n(greekT ext, (5 - matches.size())); matches += objectMgr->listMatchingObjectsI18n(greekT ext, (5 - matches.size()));
} else { } else {
matches = objectMgr->listMatchingObjectsI18n(trimmed Text, 5); matches = objectMgr->listMatchingObjectsI18n(trimmed Text, 5);
matches += objectMgr->listMatchingObjects(trimmedTex t, 5);
} }
// remove possible duplicates from completion list
matches.removeDuplicates();
ui->completionLabel->setValues(matches); ui->completionLabel->setValues(matches);
ui->completionLabel->selectFirst(); ui->completionLabel->selectFirst();
// Update push button enabled state // Update push button enabled state
ui->pushButtonGotoSearchSkyObject->setEnabled(true); ui->pushButtonGotoSearchSkyObject->setEnabled(true);
} }
} }
// Called when the current simbad query status changes // Called when the current simbad query status changes
void SearchDialog::onSimbadStatusChanged() void SearchDialog::onSimbadStatusChanged()
skipping to change at line 428 skipping to change at line 433
StelMovementMgr* mvmgr = GETSTELMODULE(StelMovementMgr); StelMovementMgr* mvmgr = GETSTELMODULE(StelMovementMgr);
if (simbadResults.contains(nameI18n)) if (simbadResults.contains(nameI18n))
{ {
close(); close();
Vec3d pos = simbadResults[nameI18n]; Vec3d pos = simbadResults[nameI18n];
objectMgr->unSelect(); objectMgr->unSelect();
mvmgr->moveToJ2000(pos, mvmgr->getAutoMoveDuration()); mvmgr->moveToJ2000(pos, mvmgr->getAutoMoveDuration());
ui->lineEditSearchSkyObject->clear(); ui->lineEditSearchSkyObject->clear();
ui->completionLabel->clearValues(); ui->completionLabel->clearValues();
} }
else if (objectMgr->findAndSelectI18n(nameI18n)) else if (objectMgr->findAndSelectI18n(nameI18n) or objectMgr->findAn dSelect(nameI18n))
{ {
const QList<StelObjectP> newSelected = objectMgr->getSelecte dObject(); const QList<StelObjectP> newSelected = objectMgr->getSelecte dObject();
if (!newSelected.empty()) if (!newSelected.empty())
{ {
close(); close();
ui->lineEditSearchSkyObject->clear(); ui->lineEditSearchSkyObject->clear();
ui->completionLabel->clearValues(); ui->completionLabel->clearValues();
// Can't point to home planet // Can't point to home planet
if (newSelected[0]->getEnglishName()!=StelApp::getIn stance().getCore()->getCurrentLocation().planetName) if (newSelected[0]->getEnglishName()!=StelApp::getIn stance().getCore()->getCurrentLocation().planetName)
{ {
 End of changes. 4 change blocks. 
1 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/