NebulaMgr.cpp   NebulaMgr.cpp 
skipping to change at line 118 skipping to change at line 118
setFlagShow(conf->value("astro/flag_nebula",true).toBool()); setFlagShow(conf->value("astro/flag_nebula",true).toBool());
setFlagHints(conf->value("astro/flag_nebula_name",false).toBool()); setFlagHints(conf->value("astro/flag_nebula_name",false).toBool());
setHintsAmount(conf->value("astro/nebula_hints_amount", 3).toDouble( )); setHintsAmount(conf->value("astro/nebula_hints_amount", 3).toDouble( ));
setLabelsAmount(conf->value("astro/nebula_labels_amount", 3).toDoubl e()); setLabelsAmount(conf->value("astro/nebula_labels_amount", 3).toDoubl e());
setCircleScale(conf->value("astro/nebula_scale",1.0f).toDouble()); setCircleScale(conf->value("astro/nebula_scale",1.0f).toDouble());
setFlagDisplayNoTexture(conf->value("astro/flag_nebula_display_no_te xture", false).toBool()); setFlagDisplayNoTexture(conf->value("astro/flag_nebula_display_no_te xture", false).toBool());
updateI18n(); updateI18n();
StelApp::getInstance().getStelObjectMgr().registerStelObjectMgr(this ); GETSTELMODULE(StelObjectMgr)->registerStelObjectMgr(this);
} }
// Draw all the Nebulae // Draw all the Nebulae
void NebulaMgr::draw(StelCore* core) void NebulaMgr::draw(StelCore* core)
{ {
const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ; const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ;
StelPainter sPainter(prj); StelPainter sPainter(prj);
StelSkyDrawer* skyDrawer = core->getSkyDrawer(); StelSkyDrawer* skyDrawer = core->getSkyDrawer();
skipping to change at line 162 skipping to change at line 162
n = static_cast<Nebula*>(*iter); n = static_cast<Nebula*>(*iter);
// improve performance by skipping if too small to see // improve performance by skipping if too small to see
if (n->angularSize>size_limit || (hintsFader.getInterstate() >0.0001 && n->mag <= maxMagHints)) if (n->angularSize>size_limit || (hintsFader.getInterstate() >0.0001 && n->mag <= maxMagHints))
{ {
prj->project(n->XYZ,n->XY); prj->project(n->XYZ,n->XY);
n->drawLabel(core, sPainter, maxMagLabels); n->drawLabel(core, sPainter, maxMagLabels);
n->drawHints(sPainter, maxMagHints); n->drawHints(sPainter, maxMagHints);
} }
} }
drawPointer(core, sPainter); if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())
drawPointer(core, sPainter);
//nebGrid.draw(prj, p); //nebGrid.draw(prj, p);
} }
void NebulaMgr::drawPointer(const StelCore* core, const StelPainter& sPaint er) void NebulaMgr::drawPointer(const StelCore* core, const StelPainter& sPaint er)
{ {
const StelNavigator* nav = core->getNavigator(); const StelNavigator* nav = core->getNavigator();
const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ; const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ;
const QList<StelObjectP> newSelected = StelApp::getInstance().getSte lObjectMgr().getSelectedObject("Nebula"); const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)- >getSelectedObject("Nebula");
if (!newSelected.empty()) if (!newSelected.empty())
{ {
const StelObjectP obj = newSelected[0]; const StelObjectP obj = newSelected[0];
Vec3d pos=obj->getJ2000EquatorialPos(nav); Vec3d pos=obj->getJ2000EquatorialPos(nav);
Vec3d screenpos; Vec3d screenpos;
// Compute 2D pos and return if outside screen // Compute 2D pos and return if outside screen
if (!prj->project(pos, screenpos)) return; if (!prj->project(pos, screenpos)) return;
glColor3f(0.4f,0.5f,0.8f); glColor3f(0.4f,0.5f,0.8f);
texPointer->bind(); texPointer->bind();
skipping to change at line 198 skipping to change at line 199
float size = obj->getAngularSize(core)*M_PI/180.*prj->getPix elPerRadAtCenter(); float size = obj->getAngularSize(core)*M_PI/180.*prj->getPix elPerRadAtCenter();
size+=20.f + 10.f*std::sin(2.f * StelApp::getInstance().getT otalRunTime()); size+=20.f + 10.f*std::sin(2.f * StelApp::getInstance().getT otalRunTime());
sPainter.drawSprite2dMode(screenpos[0]-size/2, screenpos[1]- size/2, 20, 90); sPainter.drawSprite2dMode(screenpos[0]-size/2, screenpos[1]- size/2, 20, 90);
sPainter.drawSprite2dMode(screenpos[0]-size/2, screenpos[1]+ size/2, 20, 0); sPainter.drawSprite2dMode(screenpos[0]-size/2, screenpos[1]+ size/2, 20, 0);
sPainter.drawSprite2dMode(screenpos[0]+size/2, screenpos[1]+ size/2, 20, -90); sPainter.drawSprite2dMode(screenpos[0]+size/2, screenpos[1]+ size/2, 20, -90);
sPainter.drawSprite2dMode(screenpos[0]+size/2, screenpos[1]- size/2, 20, -180); sPainter.drawSprite2dMode(screenpos[0]+size/2, screenpos[1]- size/2, 20, -180);
} }
} }
void NebulaMgr::updateSkyCulture() void NebulaMgr::updateSkyCulture(const QString& skyCultureDir)
{;} {;}
void NebulaMgr::setStelStyle(const StelStyle& style) void NebulaMgr::setStelStyle(const StelStyle& style)
{ {
// Load colors from config file // Load colors from config file
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
QString section = style.confSectionName; QString section = style.confSectionName;
QString defaultColor = conf->value(section+"/default_color").toStrin g(); QString defaultColor = conf->value(section+"/default_color").toStrin g();
setLabelsColor(StelUtils::strToVec3f(conf->value(section+"/nebula_la bel_color", defaultColor).toString())); setLabelsColor(StelUtils::strToVec3f(conf->value(section+"/nebula_la bel_color", defaultColor).toString()));
 End of changes. 4 change blocks. 
4 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/