StelObjectMgr.cpp   StelObjectMgr.cpp 
skipping to change at line 154 skipping to change at line 154
Vec3d winpos; Vec3d winpos;
prj->project(v, winpos); prj->project(v, winpos);
float xpos = winpos[0]; float xpos = winpos[0];
float ypos = winpos[1]; float ypos = winpos[1];
float best_object_value; float best_object_value;
best_object_value = 100000.f; best_object_value = 100000.f;
foreach (const StelObjectP& obj, candidates) foreach (const StelObjectP& obj, candidates)
{ {
prj->project(obj->getJ2000EquatorialPos(core), winpos); prj->project(obj->getJ2000EquatorialPos(core), winpos);
float distance = sqrt((xpos-winpos[0])*(xpos-winpos[0]) + (y pos-winpos[1])*(ypos-winpos[1]))*distanceWeight; float distance = std::sqrt((xpos-winpos[0])*(xpos-winpos[0]) + (ypos-winpos[1])*(ypos-winpos[1]))*distanceWeight;
float priority = obj->getSelectPriority(core); float priority = obj->getSelectPriority(core);
// qDebug() << (*iter).getShortInfoString(core) << ": " << p riority << " " << distance; // qDebug() << (*iter).getShortInfoString(core) << ": " << p riority << " " << distance;
if (distance + priority < best_object_value) if (distance + priority < best_object_value)
{ {
best_object_value = distance + priority; best_object_value = distance + priority;
sobj = obj; sobj = obj;
} }
} }
return sobj; return sobj;
skipping to change at line 228 skipping to change at line 228
{ {
if (action==StelModule::AddToSelection) if (action==StelModule::AddToSelection)
lastSelectedObjects.append(objs); lastSelectedObjects.append(objs);
else else
lastSelectedObjects = objs; lastSelectedObjects = objs;
emit(selectedObjectChanged(action)); emit(selectedObjectChanged(action));
return true; return true;
} }
/************************************************************************* /*************************************************************************
Return the list objects of type "withType" which was recently selected by Return the list objects of type "type" which was recently selected by
the user the user
*************************************************************************/ *************************************************************************/
QList<StelObjectP> StelObjectMgr::getSelectedObject(const QString& type) QList<StelObjectP> StelObjectMgr::getSelectedObject(const QString& type)
{ {
QList<StelObjectP> result; QList<StelObjectP> result;
for (QList<StelObjectP>::iterator iter=lastSelectedObjects.begin();i ter!=lastSelectedObjects.end();++iter) for (QList<StelObjectP>::iterator iter=lastSelectedObjects.begin();i ter!=lastSelectedObjects.end();++iter)
{ {
if ((*iter)->getType()==type) if ((*iter)->getType()==type)
result.push_back(*iter); result.push_back(*iter);
} }
skipping to change at line 351 skipping to change at line 351
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";
result["NebulaMgr:6"] = "Irregular galaxies"; result["NebulaMgr:6"] = "Irregular galaxies";
result["NebulaMgr:7"] = "Clusters associated with ne bulosity"; result["NebulaMgr:7"] = "Clusters associated with ne bulosity";
result["NebulaMgr:10"] = "Messier Catalogue"; result["NebulaMgr:9"] = "HII regions";
result["NebulaMgr:11"] = "Caldwell Catalogue"; result["NebulaMgr:10"] = "Reflection nebulae";
result["NebulaMgr:11"] = "H-α emission regions";
result["NebulaMgr:100"] = "Messier Catalogue";
result["NebulaMgr:101"] = "Caldwell Catalogue";
result["NebulaMgr:102"] = "Barnard Catalogue";
result["NebulaMgr:103"] = "Sharpless Catalogue";
result["NebulaMgr:104"] = "Van den Bergh Catalogue";
result["NebulaMgr:105"] = "The Catalogue of Rodgers,
Campbell, and Whiteoak";
result["NebulaMgr:106"] = "Collinder Catalogue";
result["NebulaMgr:107"] = "Melotte Catalogue";
} }
} }
return result; return result;
} }
 End of changes. 3 change blocks. 
4 lines changed or deleted 14 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/