From a4c9e7e56547fda359fcf087d075bb3493e6e4fd Mon Sep 17 00:00:00 2001
From: SeeLook <945374+SeeLook@users.noreply.github.com>
Date: Sun, 1 Feb 2015 13:08:02 +0100
Subject: [PATCH] Fixed adding notes from note name pop-up in recore mode,
 fixed positioning of name pop-up on lower staves

---
 TODO                     |  4 ++++
 changes                  | 10 ++++++----
 src/score/tmainscore.cpp | 16 +++++++++-------
 3 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/TODO b/TODO
index 672334994..2a655237a 100644
--- a/TODO
+++ b/TODO
@@ -20,6 +20,7 @@ MAJOR:
 - fix when 'enter note' text and edit lines apears in empty note on the score
 
 MINOR:
+- updater and analyzer windows have missing window title (and icon)
 - try to avoid many resizeEvent-s of TmultiScore during window size change
 - changing tool bar auto-hiding causes sometimes locked melody menu
 - clicked link of tip locks next click - probably due to grabbed focus - however click outside tip unlocks it
@@ -35,6 +36,9 @@ MINOR:
 - changing to/from grand staff overrides TscoreNote ambitus - there is no problem as long as ambitus is unused
 - revert to native style under MacOs when Qt5
 
+TO CONSIDER:
+- In wizard: option for single note mode for very beginners
+- In audio in settings: option for average pitch of whole note (aka voice/guitar mode)
 
 ==== SMALL NEW FEATURES/IMPROVEMENTS =============================================================
 - average effectiveness line in chart
diff --git a/changes b/changes
index afa253fba..d17ac83a1 100644
--- a/changes
+++ b/changes
@@ -1,11 +1,13 @@
 1.1.5 beta
      - detailed preview of melodies in charts
-     - added new tool button with menu for a score
+     - added new tool button with menu to manage a score
      - new, quick, click-less way for adding notes to a score
-     - A note from played exam melody can be selected to start playing from it
-     - First run wizard comes back improved  - it is a plugin now
+     - improved pop-up for selecting note name over score
+     - a note from played exam melody can be selected to start playing from it
+     - first run wizard comes back improved  - it is a plugin now
+     - updated Windows installer
     BUGS FIXES
-     - fixing bugs, mistakes and glitches...
+     - tons of fixed bugs, mistakes and glitches...
     Under the hood
      - external executable-s converted to plugins, loaded on demand
      - audio device has single instance shared with external settings plugin
diff --git a/src/score/tmainscore.cpp b/src/score/tmainscore.cpp
index 892e9ae28..b8c45b727 100644
--- a/src/score/tmainscore.cpp
+++ b/src/score/tmainscore.cpp
@@ -649,11 +649,10 @@ void TmainScore::showNameMenu(TscoreNote* sn) {
 	m_nameMenu->setNoteName(*sn->note());
 	m_currentNameSegment = sn;
 	changeCurrentIndex(sn->staff()->number() * staff()->maxNoteCount() + sn->index());
-	QPoint mPos = mapFromScene(sn->pos().x() + 8.0, 0.0);
-// 	mPos.setY(30);
-// 	mPos = mapToGlobal(mPos);
-	mPos.setX(mPos.x() /*+ mainWindow()->pos().x()*/);
-	mPos.setY(pos().y() + 50 /*+ mainWindow()->pos().y()*/);
+	QPointF notePos = sn->staff()->mapToScene(sn->pos());
+	QPoint mPos = mapFromScene(notePos.x() + 8.0, notePos.y() + 6.0);
+	mPos.setX(x() + mPos.x());
+	mPos.setY(y() + mPos.y());
 	resetClickedOff();
 	m_nameClickCounter = 0;
 	m_nameMenu->exec(mPos, transform().m11());
@@ -746,8 +745,11 @@ void TmainScore::moveSelectedNote(TmainScore::EmoveNote nDir) {
 			break;
 		}
 		case e_nextNote: {
-			if (currentIndex() < notesCount() - 1 || (insertMode() == e_record && currentIndex() == notesCount() - 1)) {
-					changeCurrentIndex(currentIndex() + 1); // record mode adds new note at the end`
+			if (currentIndex() < notesCount() - 1)
+				changeCurrentIndex(currentIndex() + 1);
+			else if (insertMode() == e_record && currentIndex() == notesCount() - 1) { // record mode:
+				checkAndAddNote(currentStaff(), currentIndex()); // first to add new note at the end
+				changeCurrentIndex(currentIndex() + 1); // then change current index
 			}
 			break;
 		}
-- 
GitLab