diff --git a/src/celestia/celestiacore.cpp b/src/celestia/celestiacore.cpp index 81351bee5..ec5bab137 100644 --- a/src/celestia/celestiacore.cpp +++ b/src/celestia/celestiacore.cpp @@ -4199,7 +4199,7 @@ void CelestiaCore::addToHistory() } } history.push_back(url); - historyCurrent = history.size(); + historyCurrent = history.size() - 1; notifyWatchers(HistoryChanged); } @@ -4207,7 +4207,7 @@ void CelestiaCore::addToHistory() void CelestiaCore::back() { if (historyCurrent == 0) return; - if (historyCurrent == history.size()) + if (historyCurrent == history.size() - 1) { addToHistory(); historyCurrent = history.size()-1; diff --git a/src/celestia/kde/kdeapp.cpp b/src/celestia/kde/kdeapp.cpp index 44f014b5c..8cda403c6 100644 --- a/src/celestia/kde/kdeapp.cpp +++ b/src/celestia/kde/kdeapp.cpp @@ -216,13 +216,13 @@ void KdeWatcher::notifyChange(CelestiaCore * core, int property) CelestiaCore::LabelFlagsChanged| CelestiaCore::TimeZoneChanged))) kdeapp->resyncMenus(); - else if (property & CelestiaCore::AmbientLightChanged) + if (property & CelestiaCore::AmbientLightChanged) kdeapp->resyncAmbient(); - else if (property & CelestiaCore::FaintestChanged) + if (property & CelestiaCore::FaintestChanged) kdeapp->resyncFaintest(); - else if (property & CelestiaCore::VerbosityLevelChanged) + if (property & CelestiaCore::VerbosityLevelChanged) kdeapp->resyncVerbosity(); - else if (property & CelestiaCore::HistoryChanged) + if (property & CelestiaCore::HistoryChanged) kdeapp->resyncHistory(); if (property == CelestiaCore::TextEnterModeChanged) {