Index: kstars/skycomponents/skymapcomposite.cpp =================================================================== --- kstars/skycomponents/skymapcomposite.cpp +++ kstars/skycomponents/skymapcomposite.cpp @@ -361,12 +361,7 @@ m_DeepSky->drawLabels(); m_ObservingList->pen = QPen(QColor(data->colorScheme()->colorNamed("ObsListColor")), 1.); - if (KStars::Instance() && !m_ObservingList->list) - m_ObservingList->list.reset(new SkyObjectList(KSUtils::makeVanillaPointerList( - KStarsData::Instance() - ->observingList() - ->sessionList()))); // Make sure we never delete the pointers in m_ObservingList->list! - + m_ObservingList->list2 = KStarsData::Instance()->observingList()->sessionList(); m_ObservingList->draw(skyp); m_Flags->draw(skyp); Index: kstars/skycomponents/targetlistcomponent.h =================================================================== --- kstars/skycomponents/targetlistcomponent.h +++ kstars/skycomponents/targetlistcomponent.h @@ -71,8 +71,12 @@ void draw(SkyPainter *skyp) override; // FIXME: Maybe we should make these member objects private / protected? - std::unique_ptr list; // Pointer to list of objects to draw - QPen pen; // Pen to use to draw + /// Pointer to list of objects to draw + std::unique_ptr list; + /// Pointer to list of objects to draw + QList> list2; + /// Pen to use to draw + QPen pen; /** * @short Pointer to static method that tells us whether to draw this list or not Index: kstars/skycomponents/targetlistcomponent.cpp =================================================================== --- kstars/skycomponents/targetlistcomponent.cpp +++ kstars/skycomponents/targetlistcomponent.cpp @@ -21,6 +21,7 @@ #include "skymap.h" #endif #include "skypainter.h" +#include "auxiliary/ksutils.h" TargetListComponent::TargetListComponent(SkyComposite *parent) : SkyComponent(parent) { @@ -48,9 +49,16 @@ { if (drawSymbols && !(*drawSymbols)()) return; - if (!list || list->count() <= 0) - return; skyp->setPen(pen); - skyp->drawObservingList(*list); + if (list && list->count() > 0) + { + skyp->drawObservingList(*list); + } + if (list2.count() > 0) + { + SkyObjectList newList = KSUtils::makeVanillaPointerList(list2); + + skyp->drawObservingList(newList); + } } Index: kstars/tools/observinglist.cpp =================================================================== --- kstars/tools/observinglist.cpp +++ kstars/tools/observinglist.cpp @@ -385,6 +385,7 @@ ui->SessionView->resizeColumnsToContents(); //Note addition in statusbar KStars::Instance()->statusBar()->showMessage(i18n("Added %1 to session list.", finalObjectName), 0); + SkyMap::Instance()->forceUpdate(); } setSaveImagesButton(); } @@ -449,6 +450,7 @@ isModified = true; //Removing an object should trigger the modified flag ui->avt->removeAllPlotObjects(); ui->SessionView->resizeColumnsToContents(); + SkyMap::Instance()->forceUpdate(); } } @@ -862,6 +864,7 @@ TimeHash.clear(); m_CurrentObject = nullptr; m_SessionModel->removeRows(0, m_SessionModel->rowCount()); + SkyMap::Instance()->forceUpdate(); //First line is the name of the list. The rest of the file is //object names, one per line. With the TimeHash value if present QTextStream istream(&f); @@ -915,6 +918,7 @@ TimeHash.clear(); isModified = true; //Removing an object should trigger the modified flag m_SessionModel->setRowCount(0); + SkyMap::Instance()->forceUpdate(); } } } @@ -1204,6 +1208,7 @@ slotAddObject(obj.data(), true, true); } } + SkyMap::Instance()->forceUpdate(); } void ObservingList::slotSetTime()