TargetsDialog.cpp   TargetsDialog.cpp 
skipping to change at line 132 skipping to change at line 132
{ {
setVisible(false); setVisible(false);
StelMainGraphicsView::getInstance().scene()->setActiveWindow(0); StelMainGraphicsView::getInstance().scene()->setActiveWindow(0);
} }
void TargetsDialog::createTargetFromSelection() void TargetsDialog::createTargetFromSelection()
{ {
if (StelApp::getInstance().getStelObjectMgr().getWasSelected()) { if (StelApp::getInstance().getStelObjectMgr().getWasSelected()) {
QList<StelObjectP> selectedObjects = StelApp::getInstance(). getStelObjectMgr().getSelectedObject(); QList<StelObjectP> selectedObjects = StelApp::getInstance(). getStelObjectMgr().getSelectedObject();
QListIterator<StelObjectP> objectIterator(selectedObjects); QListIterator<StelObjectP> objectIterator(selectedObjects);
StelNavigator* nav = StelApp::getInstance().getCore()->getNa vigator(); StelCore* core = StelApp::getInstance().getCore();
while (objectIterator.hasNext()) { while (objectIterator.hasNext()) {
StelObjectP stelObject = objectIterator.next(); StelObjectP stelObject = objectIterator.next();
QString type = stelObject->getType(); QString type = stelObject->getType();
QString englishName = stelObject->getEnglishName(); QString englishName = stelObject->getEnglishName();
if (englishName == "") { if (englishName == "") {
englishName = "No Name"; englishName = "No Name";
} }
float magnatude = stelObject->getVMagnitude(nav); float magnatude = stelObject->getVMagnitude(core);
double angularSize = stelObject->getAngularSize(Stel double angularSize = stelObject->getAngularSize(core
App::getInstance().getCore()); );
Vec3d pos; Vec3d pos;
double ra, dec; double ra, dec;
// ra/dec in J2000 // ra/dec in J2000
pos = stelObject->getJ2000EquatorialPos(nav); pos = stelObject->getJ2000EquatorialPos(core);
StelUtils::rectToSphe(&ra, &dec, pos); StelUtils::rectToSphe(&ra, &dec, pos);
QSqlField field1("name", QVariant::String); QSqlField field1("name", QVariant::String);
QSqlField field2("right_ascension", QVariant::Double ); QSqlField field2("right_ascension", QVariant::Double );
QSqlField field3("declination", QVariant::Double); QSqlField field3("declination", QVariant::Double);
QSqlField field4("target_type_id", QVariant::Int); QSqlField field4("target_type_id", QVariant::Int);
QSqlField field5("magnitude", QVariant::Double); QSqlField field5("magnitude", QVariant::Double);
QSqlField field6("size", QVariant::Double); QSqlField field6("size", QVariant::Double);
field1.setValue(QVariant(englishName)); field1.setValue(QVariant(englishName));
field2.setValue(QVariant(ra)); field2.setValue(QVariant(ra));
 End of changes. 3 change blocks. 
5 lines changed or deleted 5 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/