From df89898e6a6f19edb2c948f5e99a35b0d5287030 Mon Sep 17 00:00:00 2001
From: SeeLook <945374+SeeLook@users.noreply.github.com>
Date: Sat, 28 May 2016 13:04:49 +0200
Subject: [PATCH] Do not highlight touch of a clef when it is read only

---
 src/libs/score/tscoreclef.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libs/score/tscoreclef.cpp b/src/libs/score/tscoreclef.cpp
index 07f748bb0..fab55ac1f 100644
--- a/src/libs/score/tscoreclef.cpp
+++ b/src/libs/score/tscoreclef.cpp
@@ -143,7 +143,7 @@ void TscoreClef::touched(const QPointF& scenePos) {
   Q_UNUSED(scenePos)
   m_tapTimer->start(300);
 #if defined (Q_OS_ANDROID)
-  if (!TtouchParams::i()->clefWasTouched && tMessage && !tMessage->isVisible() && tMessage->mainWindowOnTop()) {
+  if (!readOnly() && !TtouchParams::i()->clefWasTouched && tMessage && !tMessage->isVisible() && tMessage->mainWindowOnTop()) {
     tMessage->setMessage(TtouchProxy::touchClefHelp(), 0);
     TtouchParams::i()->clefWasTouched = true;
   }
@@ -153,7 +153,7 @@ void TscoreClef::touched(const QPointF& scenePos) {
 
 void TscoreClef::untouched(const QPointF& scenePos) {
   m_tapTimer->stop();
-  if (!scenePos.isNull() && m_textClef->brush().color() == qApp->palette().highlight().color()) {
+  if (!readOnly() && !scenePos.isNull() && m_textClef->brush().color() == qApp->palette().highlight().color()) {
     m_textClef->setBrush(qApp->palette().text().color());
     m_fakeMouseEvent->setPos(mapFromScene(scenePos));
     QTimer::singleShot(5, [=]{ mousePressEvent(m_fakeMouseEvent); });
-- 
GitLab