diff --git a/src/actions.cpp b/src/actions.cpp index 0092169a..e8707d7f 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -514,10 +514,10 @@ void ScrollUpArtist::Run() while (pos > 0) { s = myScreen->GetSong(--pos); + myScreen->Scroll(wUp); if (!s || s->getArtist() != artist) break; } - mList->Highlight(pos); } } @@ -533,10 +533,10 @@ void ScrollUpAlbum::Run() while (pos > 0) { s = myScreen->GetSong(--pos); + myScreen->Scroll(wUp); if (!s || s->getAlbum() != album) break; } - mList->Highlight(pos); } } @@ -552,10 +552,10 @@ void ScrollDownArtist::Run() while (pos < mList->Size() - 1) { s = myScreen->GetSong(++pos); + myScreen->Scroll(wDown); if (!s || s->getArtist() != artist) break; } - mList->Highlight(pos); } } @@ -571,10 +571,10 @@ void ScrollDownAlbum::Run() while (pos < mList->Size() - 1) { s = myScreen->GetSong(++pos); + myScreen->Scroll(wDown); if (!s || s->getAlbum() != album) break; } - mList->Highlight(pos); } } @@ -1806,8 +1806,6 @@ void DeselectItems::Run() { // FIXME /*List *mList = myScreen->GetList(); - if (!mList->hasSelected()) - return; for (size_t i = 0; i < mList->Size(); ++i) mList->Select(i, 0); ShowMessage("Items deselected");*/ diff --git a/src/menu.h b/src/menu.h index 29a64750..b39c9165 100644 --- a/src/menu.h +++ b/src/menu.h @@ -37,19 +37,6 @@ namespace NCurses { /// struct List { - /// @see Menu::hasSelected() - /// - virtual bool hasSelected() const = 0; - - /// @see Menu::GetSelected() - /// - virtual void GetSelected(std::vector &v) const = 0; - - /// Highlights given position - /// @param pos position to be highlighted - /// - virtual void Highlight(size_t pos) = 0; - /// @return currently highlighted position /// virtual size_t Choice() const = 0; @@ -314,12 +301,12 @@ template struct Menu : public Window, public List /// Checks whether list contains selected positions /// @return true if it contains them, false otherwise /// - virtual bool hasSelected() const; + bool hasSelected() const; /// Gets positions of items that are selected /// @param v vector to be filled with selected positions numbers /// - virtual void GetSelected(std::vector &v) const; + void GetSelected(std::vector &v) const; /// Reverses selection of all items in list /// @param beginning beginning of range that has to be reversed