diff --git a/oscar/Graphs/gGraphView.cpp b/oscar/Graphs/gGraphView.cpp index cfc3b65c..846d251a 100644 --- a/oscar/Graphs/gGraphView.cpp +++ b/oscar/Graphs/gGraphView.cpp @@ -3262,7 +3262,6 @@ void gGraphView::keyPressEvent(QKeyEvent *event) //qDebug() << "Keypress??"; } - void gGraphView::setDay(Day *day) { @@ -3274,6 +3273,7 @@ void gGraphView::setDay(Day *day) ResetBounds(false); } + bool gGraphView::isEmpty() { bool res = true; diff --git a/oscar/daily.cpp b/oscar/daily.cpp index ec368fe2..fe58d54f 100644 --- a/oscar/daily.cpp +++ b/oscar/daily.cpp @@ -852,6 +852,28 @@ void Daily::ResetGraphLayout() void Daily::ResetGraphOrder() { GraphView->resetGraphOrder(true); + + // Enable all graphs (make them not hidden) + for (int i=0;igraphCombo->count();i++) { + // If disabled, emulate a click to enable the graph + if (!ui->graphCombo->itemData(i,Qt::UserRole).toBool()) { + qDebug() << "resetting graph" << i; + Daily::on_graphCombo_activated(i); + } + } + + // Mark all events as active + for (int i=0;ieventsCombo->count();i++) { + // If disabled, emulate a click to enable the event + ChannelID code = ui->eventsCombo->itemData(i, Qt::UserRole).toUInt(); + schema::Channel * chan = &schema::channel[code]; + if (!chan->enabled()) { + qDebug() << "resetting event" << i; + Daily::on_eventsCombo_activated(i); + } + } + + // Reset graph heights (and repaint) ResetGraphLayout(); } @@ -2416,6 +2438,7 @@ void Daily::on_graphCombo_activated(int index) GraphView->updateScale(); GraphView->redraw(); } + void Daily::updateCube() { //brick.. @@ -2495,7 +2518,6 @@ void Daily::updateGraphCombo() } ui->graphCombo->setCurrentIndex(0); - updateCube(); } @@ -2504,7 +2526,6 @@ void Daily::on_eventsCombo_activated(int index) if (index<0) return; - ChannelID code = ui->eventsCombo->itemData(index, Qt::UserRole).toUInt(); schema::Channel * chan = &schema::channel[code]; diff --git a/oscar/docs/release_notes.html b/oscar/docs/release_notes.html index 6b01d55d..bb52b713 100644 --- a/oscar/docs/release_notes.html +++ b/oscar/docs/release_notes.html @@ -11,7 +11,7 @@ Which was written and copyright 2011-2018 © Mark Watkins

diff --git a/oscar/updateparser.h b/oscar/updateparser.h index a086f8d8..eaa6b3a2 100644 --- a/oscar/updateparser.h +++ b/oscar/updateparser.h @@ -43,14 +43,7 @@ class Update */ struct Release { Release() {} - Release(const Release ©) { - version = copy.version; - codename = copy.version; - notes = copy.notes; - info_url = copy.info_url; - status = copy.status; - updates = copy.updates; - } + Release(const Release ©) = default; Release(QString ver, QString code, UpdateStatus stat) { version = ver; codename = code; status = stat; } QString version; @@ -94,26 +87,7 @@ class UpdateParser: public QXmlDefaultHandler class PackageUpdate { public: PackageUpdate() {} - PackageUpdate(const PackageUpdate & copy) { - // Seriously, why do I still have to do this crud by hand - // Where is the shortcut to save time here in the latest C++ extensions? - name = copy.name; - displayName = copy.displayName; - description = copy.description; - versionString = copy.versionString; - releaseDate = copy.releaseDate; - defaultInstall = copy.defaultInstall; - installScript = copy.installScript; - dependencies = copy.dependencies; - script = copy.script; - forcedInstall = copy.forcedInstall; - downloadArchives = copy.downloadArchives; - license = copy.license; - sha1 = copy.sha1; - compressedSize = copy.compressedSize; - uncompressedSize = copy.uncompressedSize; - os = copy.os; - } + PackageUpdate(const PackageUpdate & copy) = default; QString name; QString displayName;