summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/awl/tcanvas.cpp10
-rw-r--r--muse2/muse/conf.cpp3
-rw-r--r--muse2/muse/gconfig.cpp3
-rw-r--r--muse2/muse/gconfig.h1
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp13
-rw-r--r--muse2/muse/waveedit/waveview.cpp5
-rw-r--r--muse2/muse/widgets/genset.cpp3
-rw-r--r--muse2/muse/widgets/gensetbase.ui22
-rw-r--r--muse2/muse/widgets/hitscale.cpp6
-rw-r--r--muse2/muse/widgets/mtscale.cpp5
-rw-r--r--muse2/muse/widgets/mtscale_flo.cpp5
-rw-r--r--muse2/muse/widgets/musewidgetsplug.cpp5
-rw-r--r--muse2/muse/widgets/sigscale.cpp5
-rw-r--r--muse2/muse/widgets/wtscale.cpp6
14 files changed, 73 insertions, 19 deletions
diff --git a/muse2/awl/tcanvas.cpp b/muse2/awl/tcanvas.cpp
index 55d06b1f..d39080e2 100644
--- a/muse2/awl/tcanvas.cpp
+++ b/muse2/awl/tcanvas.cpp
@@ -297,8 +297,14 @@ bool TimeCanvas::eventFilter(QObject* obj, QEvent* event)
int i = 0;
if (b & Qt::MidButton)
i = 1;
- else if (b & Qt::RightButton)
- i = 2;
+ //else if (b & Qt::RightButton)
+ // i = 2;
+ else if (b & Qt::RightButton) {
+ if ((MusEConfig::config.rangeMarkerWithoutMMB) && (event->modifiers() & Qt::ControlModifier))
+ i = 1;
+ else
+ i = 2;
+ }
if (keyState & Qt::ShiftModifier)
emit addMarker(i);
emit posChanged(i, pos);
diff --git a/muse2/muse/conf.cpp b/muse2/muse/conf.cpp
index 2a3acc67..35b96591 100644
--- a/muse2/muse/conf.cpp
+++ b/muse2/muse/conf.cpp
@@ -946,6 +946,8 @@ void readConfiguration(Xml& xml, bool readOnlySequencer, bool doReadGlobalConfig
MusEConfig::config.popupsDefaultStayOpen = xml.parseInt();
else if (tag == "leftMouseButtonCanDecrease")
MusEConfig::config.leftMouseButtonCanDecrease = xml.parseInt();
+ else if (tag == "rangeMarkerWithoutMMB")
+ MusEConfig::config.rangeMarkerWithoutMMB = xml.parseInt();
// ---- the following only skips obsolete entries ----
else if ((tag == "arranger") || (tag == "geometryPianoroll") || (tag == "geometryDrumedit"))
@@ -1278,6 +1280,7 @@ void MusE::writeGlobalConfiguration(int level, Xml& xml) const
xml.intTag(level, "moveArmedCheckBox", MusEConfig::config.moveArmedCheckBox);
xml.intTag(level, "popupsDefaultStayOpen", MusEConfig::config.popupsDefaultStayOpen);
xml.intTag(level, "leftMouseButtonCanDecrease", MusEConfig::config.leftMouseButtonCanDecrease);
+ xml.intTag(level, "rangeMarkerWithoutMMB", MusEConfig::config.rangeMarkerWithoutMMB);
//for (int i = 0; i < 6; ++i) {
for (int i = 0; i < NUM_FONTS; ++i) {
diff --git a/muse2/muse/gconfig.cpp b/muse2/muse/gconfig.cpp
index ab3a0d4e..9492650b 100644
--- a/muse2/muse/gconfig.cpp
+++ b/muse2/muse/gconfig.cpp
@@ -186,7 +186,8 @@ GlobalConfigValues config = {
true, // useProjectSaveDialog
64, // minControlProcessPeriod
false, // popupsDefaultStayOpen
- false // leftMouseButtonCanDecrease
+ false, // leftMouseButtonCanDecrease
+ false // rangeMarkerWithoutMMB
};
} // namespace MusEConfig
diff --git a/muse2/muse/gconfig.h b/muse2/muse/gconfig.h
index 96abc4ac..dd5f10fd 100644
--- a/muse2/muse/gconfig.h
+++ b/muse2/muse/gconfig.h
@@ -161,6 +161,7 @@ struct GlobalConfigValues {
unsigned long minControlProcessPeriod;
bool popupsDefaultStayOpen;
bool leftMouseButtonCanDecrease;
+ bool rangeMarkerWithoutMMB;
};
extern GlobalConfigValues config;
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index 265c7ec3..b17f9b1d 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -4586,6 +4586,12 @@ void ScoreCanvas::add_new_parts(const std::map< Part*, std::set<Part*> >& param)
*
* CURRENT TODO
* ! o fix sigedit boxes (see also "important todo")
+ * o fix valgrind problems
+ * > o drum editor: channel-stuff
+ *
+ * IMPORTANT TODO
+ * ! o fix sigedit boxes (see also "current todo")
+ * o add "dotted quarter" quantize option (for 6/8 beat)
* o ticks-to-quarter spinboxes
* o newly created windows have to be focussed!
* o mirror most menus to an additional right-click context menu to avoid the long mouse pointer
@@ -4593,10 +4599,6 @@ void ScoreCanvas::add_new_parts(const std::map< Part*, std::set<Part*> >& param)
* o implement borland-style maximize: free windows do not cover the main menu, even when maximized
* o smart range selection: if range markers have been used recently (that is, a dialog with
* "range" setting, or they've been modified), default to "in range" or "selected in range"
- *
- * IMPORTANT TODO
- * ! o fix sigedit boxes (see also "current todo")
- * o add "dotted quarter" quantize option (for 6/8 beat)
*
* o rename stuff with F2 key
* o redo transport menu: offer "one beat" and "one bar" steps
@@ -4605,16 +4607,13 @@ void ScoreCanvas::add_new_parts(const std::map< Part*, std::set<Part*> >& param)
* o shrink a part from its beginning as well! watch out for clones!
*
* o canvas editor: create clone via "alt+drag" moves window instead
- * > o investigate with valgrind
* o controller view in score editor
* o solo button
- * > o drum editor: channel-stuff
* > o do partial recalculating; recalculating can take pretty long
* (0,5 sec) when displaying a whole song in scores
* o transpose etc. must also transpose key-pressure events
* o transpose: support in-key-transpose
* o thin out: remove unneeded ctrl messages
- * o make muse usable without the middle mouse button
*
* less important stuff
* o quantize-templates (everything is forced into a specified
diff --git a/muse2/muse/waveedit/waveview.cpp b/muse2/muse/waveedit/waveview.cpp
index 2b3ddfbf..9b11feb8 100644
--- a/muse2/muse/waveedit/waveview.cpp
+++ b/muse2/muse/waveedit/waveview.cpp
@@ -485,7 +485,10 @@ void WaveView::viewMouseMoveEvent(QMouseEvent* event)
i = 1;
break;
case Qt::RightButton:
- i = 2;
+ if ((MusEConfig::config.rangeMarkerWithoutMMB) && (event->modifiers() & Qt::ControlModifier))
+ i = 1;
+ else
+ i = 2;
break;
default:
return;
diff --git a/muse2/muse/widgets/genset.cpp b/muse2/muse/widgets/genset.cpp
index 16750385..1a317d0b 100644
--- a/muse2/muse/widgets/genset.cpp
+++ b/muse2/muse/widgets/genset.cpp
@@ -170,6 +170,7 @@ Shorter periods are desirable.</string>
projectSaveCheckBox->setChecked(MusEConfig::config.useProjectSaveDialog);
popsDefStayOpenCheckBox->setChecked(MusEConfig::config.popupsDefaultStayOpen);
lmbDecreasesCheckBox->setChecked(MusEConfig::config.leftMouseButtonCanDecrease);
+ rangeMarkerWithoutMMBCheckBox->setChecked(MusEConfig::config.rangeMarkerWithoutMMB);
//updateSettings(); // TESTING
@@ -307,6 +308,7 @@ void GlobalSettingsConfig::updateSettings()
projectSaveCheckBox->setChecked(MusEConfig::config.useProjectSaveDialog);
popsDefStayOpenCheckBox->setChecked(MusEConfig::config.popupsDefaultStayOpen);
lmbDecreasesCheckBox->setChecked(MusEConfig::config.leftMouseButtonCanDecrease);
+ rangeMarkerWithoutMMBCheckBox->setChecked(MusEConfig::config.rangeMarkerWithoutMMB);
updateMdiSettings();
}
@@ -404,6 +406,7 @@ void GlobalSettingsConfig::apply()
MusEConfig::config.useProjectSaveDialog = projectSaveCheckBox->isChecked();
MusEConfig::config.popupsDefaultStayOpen = popsDefStayOpenCheckBox->isChecked();
MusEConfig::config.leftMouseButtonCanDecrease = lmbDecreasesCheckBox->isChecked();
+ MusEConfig::config.rangeMarkerWithoutMMB = rangeMarkerWithoutMMBCheckBox->isChecked();
//MusEGlobal::muse->showMixer(MusEConfig::config.mixerVisible);
MusEGlobal::muse->showMixer1(MusEConfig::config.mixer1Visible);
diff --git a/muse2/muse/widgets/gensetbase.ui b/muse2/muse/widgets/gensetbase.ui
index d5be9869..ba26cf38 100644
--- a/muse2/muse/widgets/gensetbase.ui
+++ b/muse2/muse/widgets/gensetbase.ui
@@ -1386,6 +1386,26 @@ left button behave like the middle button in such areas.</string>
</property>
</widget>
</item>
+ <item row="6" column="1">
+ <widget class="QCheckBox" name="rangeMarkerWithoutMMBCheckBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Shift + Right click sets left range marker</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -1441,7 +1461,7 @@ left button behave like the middle button in such areas.</string>
<x>0</x>
<y>0</y>
<width>482</width>
- <height>166</height>
+ <height>143</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
diff --git a/muse2/muse/widgets/hitscale.cpp b/muse2/muse/widgets/hitscale.cpp
index c1fcdd87..6db0172d 100644
--- a/muse2/muse/widgets/hitscale.cpp
+++ b/muse2/muse/widgets/hitscale.cpp
@@ -22,6 +22,7 @@
#include "hitscale.h"
#include "midieditor.h"
+#include "gconfig.h"
#include <QMouseEvent>
#include <QPainter>
@@ -97,7 +98,10 @@ void HitScale::viewMouseMoveEvent(QMouseEvent* event)
i = 1;
break;
case Qt::RightButton:
- i = 2;
+ if ((MusEConfig::config.rangeMarkerWithoutMMB) && (event->modifiers() & Qt::ControlModifier))
+ i = 1;
+ else
+ i = 2;
break;
default:
return;
diff --git a/muse2/muse/widgets/mtscale.cpp b/muse2/muse/widgets/mtscale.cpp
index 1bd34de3..8f63c36b 100644
--- a/muse2/muse/widgets/mtscale.cpp
+++ b/muse2/muse/widgets/mtscale.cpp
@@ -175,7 +175,10 @@ void MTScale::viewMouseMoveEvent(QMouseEvent* event)
i = 1;
break;
case Qt::RightButton:
- i = 2;
+ if ((MusEConfig::config.rangeMarkerWithoutMMB) && (event->modifiers() & Qt::ControlModifier))
+ i = 1;
+ else
+ i = 2;
break;
default:
return; // if no button is pressed the function returns here
diff --git a/muse2/muse/widgets/mtscale_flo.cpp b/muse2/muse/widgets/mtscale_flo.cpp
index 50abf75d..beb7eef3 100644
--- a/muse2/muse/widgets/mtscale_flo.cpp
+++ b/muse2/muse/widgets/mtscale_flo.cpp
@@ -145,7 +145,10 @@ void MTScaleFlo::mouseMoveEvent(QMouseEvent* event)
i = 1;
break;
case Qt::RightButton:
- i = 2;
+ if ((MusEConfig::config.rangeMarkerWithoutMMB) && (event->modifiers() & Qt::ControlModifier))
+ i = 1;
+ else
+ i = 2;
break;
default:
return; // if no button is pressed the function returns here
diff --git a/muse2/muse/widgets/musewidgetsplug.cpp b/muse2/muse/widgets/musewidgetsplug.cpp
index 95cc6b94..3ebd1aa5 100644
--- a/muse2/muse/widgets/musewidgetsplug.cpp
+++ b/muse2/muse/widgets/musewidgetsplug.cpp
@@ -212,8 +212,9 @@ GlobalConfigValues config = {
true, // projectStoreInFolder
true, // useProjectSaveDialog
64, // minControlProcessPeriod
- false // popupsDefaultStayOpen
- true // leftMouseButtonCanDecrease
+ false, // popupsDefaultStayOpen
+ false, // leftMouseButtonCanDecrease
+ false // rangeMarkerWithoutMMBCheckBox
};
//---------------------------------------------------------
diff --git a/muse2/muse/widgets/sigscale.cpp b/muse2/muse/widgets/sigscale.cpp
index bcfb540e..2a4350b3 100644
--- a/muse2/muse/widgets/sigscale.cpp
+++ b/muse2/muse/widgets/sigscale.cpp
@@ -102,7 +102,10 @@ void SigScale::viewMouseMoveEvent(QMouseEvent* event)
i = 1;
break;
case Qt::RightButton:
- i = 2;
+ if ((MusEConfig::config.rangeMarkerWithoutMMB) && (event->modifiers() & Qt::ControlModifier))
+ i = 1;
+ else
+ i = 2;
break;
default:
return;
diff --git a/muse2/muse/widgets/wtscale.cpp b/muse2/muse/widgets/wtscale.cpp
index 3b6aa6eb..94bd058d 100644
--- a/muse2/muse/widgets/wtscale.cpp
+++ b/muse2/muse/widgets/wtscale.cpp
@@ -29,6 +29,7 @@
#include "wtscale.h"
#include "midieditor.h"
#include "globals.h"
+#include "gconfig.h"
#include "song.h"
#include "../marker/marker.h"
#include "icons.h"
@@ -133,7 +134,10 @@ void WTScale::viewMouseMoveEvent(QMouseEvent* event)
i = 1;
break;
case Qt::RightButton:
- i = 2;
+ if ((MusEConfig::config.rangeMarkerWithoutMMB) && (event->modifiers() & Qt::ControlModifier))
+ i = 1;
+ else
+ i = 2;
break;
default:
return;