StelObjectMgr.cpp   StelObjectMgr.cpp 
skipping to change at line 173 skipping to change at line 173
return sobj; return sobj;
} }
/************************************************************************* /*************************************************************************
Find in a "clever" way an object from its equatorial position Find in a "clever" way an object from its equatorial position
*************************************************************************/ *************************************************************************/
StelObjectP StelObjectMgr::cleverFind(const StelCore* core, int x, int y) c onst StelObjectP StelObjectMgr::cleverFind(const StelCore* core, int x, int y) c onst
{ {
Vec3d v; Vec3d v;
if (core->getProjection(StelCore::FrameJ2000)->unProject(x,y,v)) const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000)
;
if (prj->unProject(x,y,v))
{ {
// Nick Fedoseev patch: improve click match for refracted co
ordinates
Vec3d win;
prj->project(v,win);
float dx = x - win.v[0];
float dy = y - win.v[1];
prj->unProject(x+dx, y+dy, v);
return cleverFind(core, v); return cleverFind(core, v);
} }
return StelObjectP(); return StelObjectP();
} }
/************************************************************************* /*************************************************************************
Notify that we want to unselect any object Notify that we want to unselect any object
*************************************************************************/ *************************************************************************/
void StelObjectMgr::unSelect(void) void StelObjectMgr::unSelect(void)
{ {
skipping to change at line 309 skipping to change at line 317
} }
if (module == NULL) if (module == NULL)
{ {
qWarning() << "Can't find module with id " << objModule; qWarning() << "Can't find module with id " << objModule;
return QStringList(); return QStringList();
} }
if (subSet) if (subSet)
result = module->listAllObjectsByType(objType, inEnglish); result = module->listAllObjectsByType(objType, inEnglish);
else else
result = module->listAllObjects(inEnglish); result = module->listAllObjects(inEnglish);
return result; 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 // Celestial objects from Solar system by type
if (m->objectName()=="SolarSystem") if (m->objectName()=="SolarSystem")
{ {
result["SolarSystem:planet"] = "Planets"; result["SolarSystem:planet"] = "Planets";
result["SolarSystem:moon"] = "Moons"; result["SolarSystem:moon"] = "Moons";
result["SolarSystem:asteroid"] = "Asteroids"; result["SolarSystem:asteroid"] = "Asteroids";
result["SolarSystem:comet"] = "Comets"; result["SolarSystem:comet"] = "Comets";
result["SolarSystem:plutoid"] = "Plutoids"; result["SolarSystem:plutino"] = "Plutinos";
result["SolarSystem:cubewano"] = "Cubewanos";
result["SolarSystem:dwarf planet"] = "Dwarf planets"
;
result["SolarSystem:scattered disc object"] = "Scatt
ered disc objects";
result["SolarSystem:Oort cloud object"] = "Oort clou
d objects";
} }
// Deep-sky objects by type + couple amateur catalogue // Deep-sky objects by type + couple amateur catalogue
if (m->objectName()=="NebulaMgr") if (m->objectName()=="NebulaMgr")
{ {
result["NebulaMgr:0"] = "Bright galaxies"; result["NebulaMgr:0"] = "Bright galaxies";
result["NebulaMgr:1"] = "Open star clusters"; result["NebulaMgr:1"] = "Open star clusters";
result["NebulaMgr:2"] = "Globular star clusters"; result["NebulaMgr:2"] = "Globular star clusters";
result["NebulaMgr:3"] = "Nebulae"; result["NebulaMgr:3"] = "Nebulae";
result["NebulaMgr:4"] = "Planetary nebulae"; result["NebulaMgr:4"] = "Planetary nebulae";
result["NebulaMgr:5"] = "Dark nebulae"; result["NebulaMgr:5"] = "Dark nebulae";
 End of changes. 4 change blocks. 
2 lines changed or deleted 20 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/