diff --git a/src/glue/glue.vcxproj b/src/glue/glue.vcxproj
index a61eb2b61..b5b0ef7f1 100644
--- a/src/glue/glue.vcxproj
+++ b/src/glue/glue.vcxproj
@@ -95,6 +95,7 @@
+
@@ -109,6 +110,7 @@
+
diff --git a/src/glue/glue.vcxproj.filters b/src/glue/glue.vcxproj.filters
index 72e91cd50..973d87d7d 100644
--- a/src/glue/glue.vcxproj.filters
+++ b/src/glue/glue.vcxproj.filters
@@ -42,6 +42,9 @@
src\query
+
+ src\query
+
@@ -68,5 +71,8 @@
src\query
+
+ src\query
+
\ No newline at end of file
diff --git a/src/musikbox/app/layout/NowPlayingLayout.cpp b/src/musikbox/app/layout/NowPlayingLayout.cpp
index 134142ffa..a7374e38a 100755
--- a/src/musikbox/app/layout/NowPlayingLayout.cpp
+++ b/src/musikbox/app/layout/NowPlayingLayout.cpp
@@ -214,7 +214,6 @@ bool NowPlayingLayout::KeyPress(const std::string& key) {
return true;
}
else if (key == "M-s") {
- PlayQueueOverlays::ShowSavePlaylistOverlay(this->playback, this->library);
}
else if (ProcessEditOperation(key)) {
return true;
diff --git a/src/musikbox/app/overlay/PlayQueueOverlays.cpp b/src/musikbox/app/overlay/PlayQueueOverlays.cpp
index 652343d79..3c2c0f0d6 100644
--- a/src/musikbox/app/overlay/PlayQueueOverlays.cpp
+++ b/src/musikbox/app/overlay/PlayQueueOverlays.cpp
@@ -123,6 +123,10 @@ void PlayQueueOverlays::ShowAddCategoryOverlay(
.SetItemSelectedCallback(
[&playback, library, fieldColumn, fieldId]
(cursespp::IScrollAdapterPtr adapter, size_t index) {
+ if (index == (size_t)-1) {
+ return;
+ }
+
std::shared_ptr
query(new CategoryTrackListQuery(
library,
@@ -184,7 +188,7 @@ void PlayQueueOverlays::ShowLoadPlaylistOverlay(
.SetItemSelectedCallback(
[&playback, library, result, callback]
(cursespp::IScrollAdapterPtr adapter, size_t index) {
- if (callback) {
+ if (index != (size_t) -1 && callback) {
DBID playlistId = (*result)[index]->id;
callback(std::shared_ptr(
diff --git a/src/musikbox/cursespp/ListWindow.cpp b/src/musikbox/cursespp/ListWindow.cpp
index 670d2ec6f..957476e5b 100755
--- a/src/musikbox/cursespp/ListWindow.cpp
+++ b/src/musikbox/cursespp/ListWindow.cpp
@@ -225,6 +225,10 @@ void ListWindow::SetSelectedIndex(size_t index) {
}
size_t ListWindow::GetSelectedIndex() {
+ if (this->selectedIndex >= this->GetScrollAdapter().GetEntryCount()) {
+ return NO_SELECTION;
+ }
+
return this->selectedIndex;
}
diff --git a/src/musikbox/cursespp/Window.cpp b/src/musikbox/cursespp/Window.cpp
index a9b668671..eacc5e896 100755
--- a/src/musikbox/cursespp/Window.cpp
+++ b/src/musikbox/cursespp/Window.cpp
@@ -528,8 +528,8 @@ void Window::Create() {
this->content = newwin(
this->height - 2,
this->width - 2,
- this->GetY() + 1,
- this->GetX() + 1);
+ absoluteYOffset + this->y + 1,
+ absoluteXOffset + this->x + 1);
if (!this->content) {
/* should never happen. if there's enough room for this->frame,