StelObjectMgr.cpp   StelObjectMgr.cpp 
skipping to change at line 132 skipping to change at line 132
const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ; const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ;
// Field of view for a searchRadiusPixel pixel diameter circle on sc reen // Field of view for a searchRadiusPixel pixel diameter circle on sc reen
float fov_around = core->getMovementMgr()->getCurrentFov()/qMin(prj- >getViewportWidth(), prj->getViewportHeight()) * searchRadiusPixel; float fov_around = core->getMovementMgr()->getCurrentFov()/qMin(prj- >getViewportWidth(), prj->getViewportHeight()) * searchRadiusPixel;
// Collect the objects inside the range // Collect the objects inside the range
foreach (const StelObjectModule* m, objectsModule) foreach (const StelObjectModule* m, objectsModule)
candidates += m->searchAround(v, fov_around, core); candidates += m->searchAround(v, fov_around, core);
float limitMag = core->getSkyDrawer()->getLimitMagnitude()-2.f; // GZ 2014-08-17: This should be exactly the sky's limit magnitude (
or even more, but not less!), else visible stars cannot be clicked.
float limitMag = core->getSkyDrawer()->getLimitMagnitude(); // -2.f;
QList<StelObjectP> tmp; QList<StelObjectP> tmp;
foreach (const StelObjectP& obj, candidates) foreach (const StelObjectP& obj, candidates)
{ {
if (obj->getSelectPriority(core)<=limitMag) if (obj->getSelectPriority(core)<=limitMag)
tmp.append(obj); tmp.append(obj);
} }
candidates = tmp; candidates = tmp;
// Now select the object minimizing the function y = distance(in pix el) + magnitude // Now select the object minimizing the function y = distance(in pix el) + magnitude
skipping to change at line 279 skipping to change at line 280
} }
result.sort(); result.sort();
return result; return result;
} }
QStringList StelObjectMgr::listAllModuleObjects(const QString &moduleId, bo ol inEnglish) const QStringList StelObjectMgr::listAllModuleObjects(const QString &moduleId, bo ol inEnglish) const
{ {
// search for module // search for module
StelObjectModule* module = NULL; StelObjectModule* module = NULL;
QStringList result, list;
QString objModule, objType;
bool subSet = false;
if (moduleId.contains(":"))
{
subSet = true;
list = moduleId.split(":", QString::SkipEmptyParts);
objModule = list.at(0);
objType = list.at(1);
}
else
objModule = moduleId;
foreach(StelObjectModule* m, objectsModule) foreach(StelObjectModule* m, objectsModule)
{ {
if (m->objectName() == moduleId) if (m->objectName() == objModule)
{ {
module = m; module = m;
break; break;
} }
} }
if (module == NULL) if (module == NULL)
{ {
qWarning() << "Can't find module with id " << moduleId; qWarning() << "Can't find module with id " << objModule;
return QStringList(); return QStringList();
} }
return module->listAllObjects(inEnglish); if (subSet)
result = module->listAllObjectsByType(objType, inEnglish);
else
result = module->listAllObjects(inEnglish);
return result;
} }
QMap<QString, QString> StelObjectMgr::objectModulesMap() const QMap<QString, QString> StelObjectMgr::objectModulesMap() const
{ {
QMap<QString, QString> result; QMap<QString, QString> result;
foreach(const StelObjectModule* m, objectsModule) foreach(const StelObjectModule* m, objectsModule)
{ {
result[m->objectName()] = m->getName(); result[m->objectName()] = m->getName();
// Celestial objects from Solar system by type
if (m->objectName()=="SolarSystem")
{
result["SolarSystem:planet"] = "Planets";
result["SolarSystem:moon"] = "Moons";
result["SolarSystem:asteroid"] = "Asteroids";
result["SolarSystem:comet"] = "Comets";
result["SolarSystem:plutoid"] = "Plutoids";
}
// Deep-sky objects by type + couple amateur catalogue
if (m->objectName()=="NebulaMgr")
{
result["NebulaMgr:0"] = "Bright galaxies";
result["NebulaMgr:1"] = "Open star clusters";
result["NebulaMgr:2"] = "Globular star clusters";
result["NebulaMgr:3"] = "Nebulae";
result["NebulaMgr:4"] = "Planetary nebulae";
result["NebulaMgr:5"] = "Dark nebulae";
result["NebulaMgr:6"] = "Irregular galaxies";
result["NebulaMgr:7"] = "Clusters associated with ne
bulosity";
result["NebulaMgr:10"] = "Messier Catalogue";
result["NebulaMgr:11"] = "Caldwell Catalogue";
}
} }
return result; return result;
} }
 End of changes. 6 change blocks. 
4 lines changed or deleted 46 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/