summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-12-26 18:30:21 +0000
committerFlorian Jung <flo@windfisch.org>2011-12-26 18:30:21 +0000
commit0d8e763949e498c1baf3a2fac7b0b3a406eb0068 (patch)
tree2d4360945d386cf6f34f3e619e4e23e8cb52b3ef /muse2/muse
parent1fe51e45eebbfc2ac198ed4778c9afdb9eaf2ed0 (diff)
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/app.cpp15
-rw-r--r--muse2/muse/arranger/arrangerview.cpp34
-rw-r--r--muse2/muse/cobject.cpp7
-rw-r--r--muse2/muse/cobject.h1
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp4
-rw-r--r--muse2/muse/mixer/amixer.cpp22
-rw-r--r--muse2/muse/mixer/astrip.cpp78
-rw-r--r--muse2/muse/mixer/mstrip.cpp40
-rw-r--r--muse2/muse/mixer/mstrip.h1
-rw-r--r--muse2/muse/mixer/strip.cpp1
-rw-r--r--muse2/muse/mixer/strip.h1
-rw-r--r--muse2/muse/transport.cpp5
-rw-r--r--muse2/muse/transport.h1
-rw-r--r--muse2/muse/widgets/bigtime.cpp1
-rw-r--r--muse2/muse/widgets/drange.cpp3
-rw-r--r--muse2/muse/widgets/knob.cpp3
-rw-r--r--muse2/muse/widgets/meter.cpp3
-rw-r--r--muse2/muse/widgets/visibletracks.cpp2
18 files changed, 132 insertions, 90 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index 4fd01bf7..d65a071f 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -2442,7 +2442,10 @@ void MusE::configAppearance()
void MusE::loadTheme(const QString& s)
{
if (style()->objectName() != s)
+ {
QApplication::setStyle(s);
+ style()->setObjectName(s); // p4.0.45
+ }
}
//---------------------------------------------------------
@@ -3021,7 +3024,7 @@ void MusE::updateConfiguration()
void MusE::showBigtime(bool on)
{
if (on && bigtime == 0) {
- bigtime = new MusEGui::BigTime(0);
+ bigtime = new MusEGui::BigTime(this);
bigtime->setPos(0, MusEGlobal::song->cpos(), false);
connect(MusEGlobal::song, SIGNAL(posChanged(int, unsigned, bool)), bigtime, SLOT(setPos(int, unsigned, bool)));
connect(MusEGlobal::muse, SIGNAL(configChanged()), bigtime, SLOT(configChanged()));
@@ -3136,12 +3139,10 @@ QWidget* MusE::bigtimeWindow() { return bigtime; }
void MusE::focusInEvent(QFocusEvent* ev)
{
- //if (audioMixer)
- // audioMixer->raise();
- if (mixer1)
- mixer1->raise();
- if (mixer2)
- mixer2->raise();
+ //if (mixer1) // Removed p4.0.45
+ // mixer1->raise();
+ //if (mixer2)
+ // mixer2->raise();
raise();
QMainWindow::focusInEvent(ev);
}
diff --git a/muse2/muse/arranger/arrangerview.cpp b/muse2/muse/arranger/arrangerview.cpp
index 52be5194..aff3d056 100644
--- a/muse2/muse/arranger/arrangerview.cpp
+++ b/muse2/muse/arranger/arrangerview.cpp
@@ -77,7 +77,7 @@ namespace MusEGui {
ArrangerView::ArrangerView(QWidget* parent)
: TopWin(TopWin::ARRANGER, parent, "arrangerview", Qt::Window)
{
- using MusEGlobal::muse;
+ //using MusEGlobal::muse;
//setAttribute(Qt::WA_DeleteOnClose);
setWindowTitle(tr("MusE: Arranger"));
@@ -121,12 +121,12 @@ ArrangerView::ArrangerView(QWidget* parent)
connect(editTools, SIGNAL(toolChanged(int)), arranger, SLOT(setTool(int)));
connect(visTracks, SIGNAL(visibilityChanged()), MusEGlobal::song, SLOT(update()) );
- connect(arranger, SIGNAL(editPart(MusECore::Track*)), muse, SLOT(startEditor(MusECore::Track*)));
- connect(arranger, SIGNAL(dropSongFile(const QString&)), muse, SLOT(loadProjectFile(const QString&)));
- connect(arranger, SIGNAL(dropMidiFile(const QString&)), muse, SLOT(importMidi(const QString&)));
- connect(arranger, SIGNAL(startEditor(MusECore::PartList*,int)), muse, SLOT(startEditor(MusECore::PartList*,int)));
+ connect(arranger, SIGNAL(editPart(MusECore::Track*)), MusEGlobal::muse, SLOT(startEditor(MusECore::Track*)));
+ connect(arranger, SIGNAL(dropSongFile(const QString&)), MusEGlobal::muse, SLOT(loadProjectFile(const QString&)));
+ connect(arranger, SIGNAL(dropMidiFile(const QString&)), MusEGlobal::muse, SLOT(importMidi(const QString&)));
+ connect(arranger, SIGNAL(startEditor(MusECore::PartList*,int)), MusEGlobal::muse, SLOT(startEditor(MusECore::PartList*,int)));
connect(arranger, SIGNAL(toolChanged(int)), editTools, SLOT(set(int)));
- connect(muse, SIGNAL(configChanged()), arranger, SLOT(configChanged()));
+ connect(MusEGlobal::muse, SIGNAL(configChanged()), arranger, SLOT(configChanged()));
connect(arranger, SIGNAL(setUsedTool(int)), editTools, SLOT(set(int)));
connect(arranger, SIGNAL(selectionChanged()), SLOT(selectionChanged()));
connect(MusEGlobal::song, SIGNAL(songChanged(int)), visTracks, SLOT(updateVisibleTracksButtons()));
@@ -331,19 +331,19 @@ ArrangerView::ArrangerView(QWidget* parent)
connect(editSignalMapper, SIGNAL(mapped(int)), this, SLOT(cmd(int)));
- connect(startPianoEditAction, SIGNAL(activated()), muse, SLOT(startPianoroll()));
- connect(startScoreEditAction, SIGNAL(activated()), muse, SLOT(startScoreQuickly()));
- connect(startDrumEditAction, SIGNAL(activated()), muse, SLOT(startDrumEditor()));
- connect(startListEditAction, SIGNAL(activated()), muse, SLOT(startListEditor()));
- connect(startWaveEditAction, SIGNAL(activated()), muse, SLOT(startWaveEditor()));
- connect(scoreOneStaffPerTrackMapper, SIGNAL(mapped(QWidget*)), muse, SLOT(openInScoreEdit_oneStaffPerTrack(QWidget*)));
- connect(scoreAllInOneMapper, SIGNAL(mapped(QWidget*)), muse, SLOT(openInScoreEdit_allInOne(QWidget*)));
+ connect(startPianoEditAction, SIGNAL(activated()), MusEGlobal::muse, SLOT(startPianoroll()));
+ connect(startScoreEditAction, SIGNAL(activated()), MusEGlobal::muse, SLOT(startScoreQuickly()));
+ connect(startDrumEditAction, SIGNAL(activated()), MusEGlobal::muse, SLOT(startDrumEditor()));
+ connect(startListEditAction, SIGNAL(activated()), MusEGlobal::muse, SLOT(startListEditor()));
+ connect(startWaveEditAction, SIGNAL(activated()), MusEGlobal::muse, SLOT(startWaveEditor()));
+ connect(scoreOneStaffPerTrackMapper, SIGNAL(mapped(QWidget*)), MusEGlobal::muse, SLOT(openInScoreEdit_oneStaffPerTrack(QWidget*)));
+ connect(scoreAllInOneMapper, SIGNAL(mapped(QWidget*)), MusEGlobal::muse, SLOT(openInScoreEdit_allInOne(QWidget*)));
- connect(masterGraphicAction, SIGNAL(activated()), muse, SLOT(startMasterEditor()));
- connect(masterListAction, SIGNAL(activated()), muse, SLOT(startLMasterEditor()));
+ connect(masterGraphicAction, SIGNAL(activated()), MusEGlobal::muse, SLOT(startMasterEditor()));
+ connect(masterListAction, SIGNAL(activated()), MusEGlobal::muse, SLOT(startLMasterEditor()));
- connect(midiTransformerAction, SIGNAL(activated()), muse, SLOT(startMidiTransformer()));
+ connect(midiTransformerAction, SIGNAL(activated()), MusEGlobal::muse, SLOT(startMidiTransformer()));
//-------- Structure connections
@@ -356,7 +356,7 @@ ArrangerView::ArrangerView(QWidget* parent)
- connect(muse, SIGNAL(configChanged()), SLOT(updateShortcuts()));
+ connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(updateShortcuts()));
QClipboard* cb = QApplication::clipboard();
diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp
index 50586d45..ded80e1c 100644
--- a/muse2/muse/cobject.cpp
+++ b/muse2/muse/cobject.cpp
@@ -572,6 +572,13 @@ void TopWin::resize(const QSize& s)
resize(s.width(), s.height());
}
+void TopWin::setWindowTitle (const QString& title)
+{
+ QMainWindow::setWindowTitle(title);
+ muse->updateWindowMenu();
+}
+
+
TopWin* ToplevelList::findType(TopWin::ToplevelType type) const
{
for (ciToplevel i = begin(); i != end(); ++i)
diff --git a/muse2/muse/cobject.h b/muse2/muse/cobject.h
index f6ea2ce1..f13ff591 100644
--- a/muse2/muse/cobject.h
+++ b/muse2/muse/cobject.h
@@ -137,6 +137,7 @@ class TopWin : public QMainWindow
void shareToolsAndMenu(bool);
void restoreMainwinState();
void storeInitialState() const;
+ virtual void setWindowTitle (const QString&);
};
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index 51e1cafc..44cfc114 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -1287,7 +1287,7 @@ ScoreCanvas::ScoreCanvas(ScoreEdit* pr, QWidget* parent_widget) : View(parent_wi
_pixels_per_whole_init = _pixels_per_whole_init;
note_velo=note_velo_init;
- note_velo_off_init=note_velo_off_init;
+ note_velo_off=note_velo_off_init;
dragging_staff=false;
@@ -3828,7 +3828,7 @@ void ScoreCanvas::mousePressEvent (QMouseEvent* event)
MusEGlobal::audio->msgAddEvent(newevent, curr_part, true, false, false);
- dragged_event_part=curr_part;
+ set_dragged_event_part(curr_part);
dragged_event=newevent;
original_dragged_event=dragged_event.clone();
diff --git a/muse2/muse/mixer/amixer.cpp b/muse2/muse/mixer/amixer.cpp
index 25171450..d03cc81e 100644
--- a/muse2/muse/mixer/amixer.cpp
+++ b/muse2/muse/mixer/amixer.cpp
@@ -236,7 +236,9 @@ AudioMixerApp::AudioMixerApp(QWidget* parent, MusEGlobal::MixerConfig* c)
connect(MusEGlobal::song, SIGNAL(songChanged(int)), SLOT(songChanged(int)));
connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(configChanged()));
- MusEGlobal::song->update(); // calls update mixer
+
+ //MusEGlobal::song->update(); // calls update mixer
+ updateMixer(UPDATE_ALL); // Build the mixer, add the strips. p4.0.45
}
/*
@@ -392,7 +394,6 @@ void AudioMixerApp::updateMixer(UpdateAction action)
return;
}
- // Added by Tim. p3.3.7
else if (action == UPDATE_MIDI)
{
int i = 0;
@@ -538,7 +539,10 @@ void AudioMixerApp::updateMixer(UpdateAction action)
void AudioMixerApp::configChanged()
{
- songChanged(-1); // Catch when fonts change, do full rebuild.
+ //songChanged(-1); // SC_CONFIG // Catch when fonts change, do full rebuild.
+ StripList::iterator si = stripList.begin(); // Catch when fonts change, viewable tracks, etc. No full rebuild. p4.0.45
+ for (; si != stripList.end(); ++si)
+ (*si)->configChanged();
}
//---------------------------------------------------------
@@ -552,7 +556,8 @@ void AudioMixerApp::songChanged(int flags)
return;
UpdateAction action = NO_UPDATE;
- if (flags == -1)
+
+ if (flags == -1)
action = UPDATE_ALL;
else if (flags & SC_TRACK_REMOVED)
action = STRIP_REMOVED;
@@ -560,15 +565,18 @@ void AudioMixerApp::songChanged(int flags)
action = STRIP_INSERTED;
else if (flags & SC_MIDI_TRACK_PROP)
action = UPDATE_MIDI;
+
//if (action != NO_UPDATE)
- if (action != NO_UPDATE && action != UPDATE_MIDI) // p4.0.14 Fix for very slow track prop adjusting.
+ if (action != NO_UPDATE && action != UPDATE_MIDI) // Fix for very slow track prop adjusting.
updateMixer(action);
- if (action != UPDATE_ALL) {
+
+ if (action != UPDATE_ALL)
+ {
StripList::iterator si = stripList.begin();
for (; si != stripList.end(); ++si) {
(*si)->songChanged(flags);
}
- }
+ }
}
//---------------------------------------------------------
diff --git a/muse2/muse/mixer/astrip.cpp b/muse2/muse/mixer/astrip.cpp
index ecb2f507..ccd47661 100644
--- a/muse2/muse/mixer/astrip.cpp
+++ b/muse2/muse/mixer/astrip.cpp
@@ -116,11 +116,38 @@ void AudioStrip::heartBeat()
//---------------------------------------------------------
// configChanged
+// Catch when label font, or configuration min slider and meter values change, or viewable tracks etc.
//---------------------------------------------------------
void AudioStrip::configChanged()
{
- songChanged(SC_CONFIG);
+ // Set the whole strip's font, except for the label.
+ if(font() != MusEGlobal::config.fonts[1])
+ setFont(MusEGlobal::config.fonts[1]);
+
+ // Set the strip label's font.
+ setLabelFont();
+ setLabelText();
+
+ // Adjust minimum volume slider and label values.
+ slider->setRange(MusEGlobal::config.minSlider-0.1, 10.0);
+ sl->setRange(MusEGlobal::config.minSlider, 10.0);
+
+ // Adjust minimum aux knob and label values.
+ int n = auxKnob.size();
+ for (int idx = 0; idx < n; ++idx)
+ {
+ auxKnob[idx]->blockSignals(true);
+ auxLabel[idx]->blockSignals(true);
+ auxKnob[idx]->setRange(MusEGlobal::config.minSlider-0.1, 10.0);
+ auxLabel[idx]->setRange(MusEGlobal::config.minSlider, 10.1);
+ auxKnob[idx]->blockSignals(false);
+ auxLabel[idx]->blockSignals(false);
+ }
+
+ // Adjust minimum meter values.
+ for(int c = 0; c < channel; ++c)
+ meter[c]->setRange(MusEGlobal::config.minMeter, 10.0);
}
//---------------------------------------------------------
@@ -142,32 +169,7 @@ void AudioStrip::songChanged(int val)
// Catch when label font, or configuration min slider and meter values change.
if (val & SC_CONFIG)
{
- // Added by Tim. p3.3.9
-
- // Set the strip label's font.
- //label->setFont(MusEGlobal::config.fonts[1]);
- setLabelFont();
- setLabelText();
-
- // Adjust minimum volume slider and label values.
- slider->setRange(MusEGlobal::config.minSlider-0.1, 10.0);
- sl->setRange(MusEGlobal::config.minSlider, 10.0);
-
- // Adjust minimum aux knob and label values.
- int n = auxKnob.size();
- for (int idx = 0; idx < n; ++idx)
- {
- auxKnob[idx]->blockSignals(true);
- auxLabel[idx]->blockSignals(true);
- auxKnob[idx]->setRange(MusEGlobal::config.minSlider-0.1, 10.0);
- auxLabel[idx]->setRange(MusEGlobal::config.minSlider, 10.1);
- auxKnob[idx]->blockSignals(false);
- auxLabel[idx]->blockSignals(false);
- }
-
- // Adjust minimum meter values.
- for(int c = 0; c < channel; ++c)
- meter[c]->setRange(MusEGlobal::config.minMeter, 10.0);
+ // So far only 1 instance of sending SC_CONFIG in the entire app, in instrument editor when a new instrument is saved.
}
if (mute && (val & SC_MUTE)) { // mute && off
@@ -677,7 +679,7 @@ MusEGui::Knob* AudioStrip::addKnob(int type, int id, MusEGui::DoubleLabel** dlab
if (dlabel)
*dlabel = pl;
pl->setSlider(knob);
- pl->setFont(MusEGlobal::config.fonts[1]);
+ ///pl->setFont(MusEGlobal::config.fonts[1]);
pl->setBackgroundRole(QPalette::Mid);
pl->setFrame(true);
if (type == 0)
@@ -694,7 +696,7 @@ MusEGui::Knob* AudioStrip::addKnob(int type, int id, MusEGui::DoubleLabel** dlab
label.sprintf("Aux%d", id+1);
QLabel* plb = new QLabel(label, this);
- plb->setFont(MusEGlobal::config.fonts[1]);
+ ///plb->setFont(MusEGlobal::config.fonts[1]);
plb->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
plb->setAlignment(Qt::AlignCenter);
@@ -751,6 +753,10 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at)
record = 0;
off = 0;
+ // Set the whole strip's font, except for the label. p4.0.45
+ setFont(MusEGlobal::config.fonts[1]);
+
+
MusECore::AudioTrack* t = (MusECore::AudioTrack*)track;
channel = at->channels();
///setMinimumWidth(STRIP_WIDTH);
@@ -774,7 +780,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at)
//---------------------------------------------------
stereo = new QToolButton();
- stereo->setFont(MusEGlobal::config.fonts[1]);
+ ///stereo->setFont(MusEGlobal::config.fonts[1]);
stereo->setCheckable(true);
stereo->setToolTip(tr("1/2 channel"));
stereo->setChecked(channel == 2);
@@ -788,7 +794,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at)
stereo->setEnabled(false);
pre = new QToolButton();
- pre->setFont(MusEGlobal::config.fonts[1]);
+ ///pre->setFont(MusEGlobal::config.fonts[1]);
pre->setCheckable(true);
pre->setText(tr("Pre"));
pre->setToolTip(tr("pre fader - post fader"));
@@ -841,7 +847,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at)
slider->setCursorHoming(true);
slider->setRange(MusEGlobal::config.minSlider-0.1, 10.0);
slider->setFixedWidth(20);
- slider->setFont(MusEGlobal::config.fonts[1]);
+ ///slider->setFont(MusEGlobal::config.fonts[1]);
slider->setValue(MusECore::fast_log10(t->volume())*20.0);
sliderGrid->addWidget(slider, 0, 0, Qt::AlignHCenter);
@@ -859,7 +865,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at)
sl = new MusEGui::DoubleLabel(0.0, MusEGlobal::config.minSlider, 10.0, this);
sl->setSlider(slider);
- sl->setFont(MusEGlobal::config.fonts[1]);
+ ///sl->setFont(MusEGlobal::config.fonts[1]);
sl->setBackgroundRole(QPalette::Mid);
sl->setSuffix(tr("dB"));
sl->setFrame(true);
@@ -954,7 +960,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at)
if (type != MusECore::Track::AUDIO_AUX) {
iR = new QToolButton();
- iR->setFont(MusEGlobal::config.fonts[1]);
+ ///iR->setFont(MusEGlobal::config.fonts[1]);
iR->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum));
///iR->setText(tr("iR"));
iR->setIcon(QIcon(*routesInIcon));
@@ -966,7 +972,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at)
}
oR = new QToolButton();
- oR->setFont(MusEGlobal::config.fonts[1]);
+ ///oR->setFont(MusEGlobal::config.fonts[1]);
oR->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum));
///oR->setText(tr("oR"));
oR->setIcon(QIcon(*routesOutIcon));
@@ -981,7 +987,7 @@ AudioStrip::AudioStrip(QWidget* parent, MusECore::AudioTrack* at)
//---------------------------------------------------
autoType = new MusEGui::ComboBox();
- autoType->setFont(MusEGlobal::config.fonts[1]);
+ ///autoType->setFont(MusEGlobal::config.fonts[1]);
autoType->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
//autoType->setAutoFillBackground(true);
diff --git a/muse2/muse/mixer/mstrip.cpp b/muse2/muse/mixer/mstrip.cpp
index 031eaa4b..80663c29 100644
--- a/muse2/muse/mixer/mstrip.cpp
+++ b/muse2/muse/mixer/mstrip.cpp
@@ -110,7 +110,7 @@ void MidiStrip::addKnob(int idx, const QString& tt, const QString& label,
dl->setSpecialText(tr("off"));
dl->setToolTip(tr("double click on/off"));
controller[idx].dl = dl;
- dl->setFont(MusEGlobal::config.fonts[1]);
+ ///dl->setFont(MusEGlobal::config.fonts[1]);
dl->setBackgroundRole(QPalette::Mid);
dl->setFrame(true);
dl->setPrecision(0);
@@ -153,7 +153,7 @@ void MidiStrip::addKnob(int idx, const QString& tt, const QString& label,
QLabel* lb = new QLabel(label, this);
controller[idx].lb = lb;
- lb->setFont(MusEGlobal::config.fonts[1]);
+ ///lb->setFont(MusEGlobal::config.fonts[1]);
lb->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
lb->setAlignment(Qt::AlignCenter);
lb->setEnabled(enabled);
@@ -178,6 +178,9 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t)
{
inHeartBeat = true;
+ // Set the whole strip's font, except for the label. p4.0.45
+ setFont(MusEGlobal::config.fonts[1]);
+
// Clear so the meters don't start off by showing stale values.
t->setActivity(0);
t->setLastActivity(0);
@@ -211,7 +214,7 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t)
slider->setCursorHoming(true);
slider->setRange(double(mn), double(mx), 1.0);
slider->setFixedWidth(20);
- slider->setFont(MusEGlobal::config.fonts[1]);
+ ///slider->setFont(MusEGlobal::config.fonts[1]);
slider->setId(MusECore::CTRL_VOLUME);
meter[0] = new MusEGui::Meter(this, MusEGui::Meter::LinMeter);
@@ -226,7 +229,7 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t)
grid->addLayout(sliderGrid, _curGridRow++, 0, 1, 2);
sl = new MusEGui::DoubleLabel(0.0, -98.0, 0.0, this);
- sl->setFont(MusEGlobal::config.fonts[1]);
+ ///sl->setFont(MusEGlobal::config.fonts[1]);
sl->setBackgroundRole(QPalette::Mid);
sl->setSpecialText(tr("off"));
sl->setSuffix(tr("dB"));
@@ -381,7 +384,7 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t)
//---------------------------------------------------
iR = new QToolButton();
- iR->setFont(MusEGlobal::config.fonts[1]);
+ ///iR->setFont(MusEGlobal::config.fonts[1]);
iR->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum));
///iR->setText(tr("iR"));
iR->setIcon(QIcon(*routesMidiInIcon));
@@ -391,7 +394,7 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t)
grid->addWidget(iR, _curGridRow, 0);
connect(iR, SIGNAL(pressed()), SLOT(iRoutePressed()));
oR = new QToolButton();
- oR->setFont(MusEGlobal::config.fonts[1]);
+ ///oR->setFont(MusEGlobal::config.fonts[1]);
oR->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum));
///oR->setText(tr("oR"));
oR->setIcon(QIcon(*routesMidiOutIcon));
@@ -409,7 +412,7 @@ MidiStrip::MidiStrip(QWidget* parent, MusECore::MidiTrack* t)
//---------------------------------------------------
autoType = new MusEGui::ComboBox();
- autoType->setFont(MusEGlobal::config.fonts[1]);
+ ///autoType->setFont(MusEGlobal::config.fonts[1]);
autoType->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
autoType->setEnabled(false);
@@ -466,6 +469,22 @@ void MidiStrip::updateOffState()
}
//---------------------------------------------------------
+// configChanged
+// Catch when config label font changes, viewable tracks etc.
+//---------------------------------------------------------
+
+void MidiStrip::configChanged()
+{
+ // Set the whole strip's font, except for the label. p4.0.45
+ if(font() != MusEGlobal::config.fonts[1])
+ setFont(MusEGlobal::config.fonts[1]);
+
+ // Set the strip label's font.
+ setLabelFont();
+ setLabelText();
+}
+
+//---------------------------------------------------------
// songChanged
//---------------------------------------------------------
@@ -501,13 +520,10 @@ void MidiStrip::songChanged(int val)
}
- // Catch when label font changes. Tim. p3.3.9
+ // Catch when label font changes.
if (val & SC_CONFIG)
{
- // Set the strip label's font.
- //label->setFont(MusEGlobal::config.fonts[1]);
- setLabelFont();
- setLabelText();
+ // So far only 1 instance of sending SC_CONFIG in the entire app, in instrument editor when a new instrument is saved.
}
}
diff --git a/muse2/muse/mixer/mstrip.h b/muse2/muse/mixer/mstrip.h
index bb095363..d5bf5a9f 100644
--- a/muse2/muse/mixer/mstrip.h
+++ b/muse2/muse/mixer/mstrip.h
@@ -90,6 +90,7 @@ class MidiStrip : public Strip {
public slots:
virtual void songChanged(int);
+ virtual void configChanged();
public:
MidiStrip(QWidget* parent, MusECore::MidiTrack*);
diff --git a/muse2/muse/mixer/strip.cpp b/muse2/muse/mixer/strip.cpp
index c26a9a15..e8b52887 100644
--- a/muse2/muse/mixer/strip.cpp
+++ b/muse2/muse/mixer/strip.cpp
@@ -101,7 +101,6 @@ void Strip::heartBeat()
//---------------------------------------------------------
// setLabelFont
//---------------------------------------------------------
-// Added by Tim. p3.3.9
void Strip::setLabelFont()
{
diff --git a/muse2/muse/mixer/strip.h b/muse2/muse/mixer/strip.h
index d0cde1a6..5e788484 100644
--- a/muse2/muse/mixer/strip.h
+++ b/muse2/muse/mixer/strip.h
@@ -87,6 +87,7 @@ class Strip : public QFrame {
public slots:
void resetPeaks();
virtual void songChanged(int) = 0;
+ virtual void configChanged() = 0;
public:
Strip(QWidget* parent, MusECore::Track* t);
diff --git a/muse2/muse/transport.cpp b/muse2/muse/transport.cpp
index e978cb2e..96ca599d 100644
--- a/muse2/muse/transport.cpp
+++ b/muse2/muse/transport.cpp
@@ -520,11 +520,6 @@ Transport::Transport(QWidget* parent, const char* name)
hbox->addWidget(righthandle);
}
-Transport::~Transport()
-{
- //printf("Transport::~Transport\n");
-}
-
//---------------------------------------------------------
// configChanged
//---------------------------------------------------------
diff --git a/muse2/muse/transport.h b/muse2/muse/transport.h
index 9508b510..27fd7624 100644
--- a/muse2/muse/transport.h
+++ b/muse2/muse/transport.h
@@ -150,7 +150,6 @@ class Transport : public QWidget
public:
Transport(QWidget* parent, const char* name = 0);
- ~Transport();
QColor getHandleColor() const { return lefthandle->palette().color(QPalette::Window); }
};
diff --git a/muse2/muse/widgets/bigtime.cpp b/muse2/muse/widgets/bigtime.cpp
index af49cea1..0b213f28 100644
--- a/muse2/muse/widgets/bigtime.cpp
+++ b/muse2/muse/widgets/bigtime.cpp
@@ -104,7 +104,6 @@ BigTime::BigTime(QWidget* parent)
setWindowTitle(tr("MusE: Bigtime"));
}
-
//---------------------------------------------------------
// fmtButtonToggled
//---------------------------------------------------------
diff --git a/muse2/muse/widgets/drange.cpp b/muse2/muse/widgets/drange.cpp
index 7669c18c..20c92e96 100644
--- a/muse2/muse/widgets/drange.cpp
+++ b/muse2/muse/widgets/drange.cpp
@@ -165,6 +165,9 @@ void DoubleRange::setRange(double vmin, double vmax, double vstep, int pageSize)
{
bool rchg = ((d_maxValue != vmax) || (d_minValue != vmin));
+ if(!rchg && vstep == d_step && pageSize == d_pageSize) // p4.0.45
+ return;
+
if (rchg) {
d_minValue = vmin;
d_maxValue = vmax;
diff --git a/muse2/muse/widgets/knob.cpp b/muse2/muse/widgets/knob.cpp
index 269f65cf..e53e1a05 100644
--- a/muse2/muse/widgets/knob.cpp
+++ b/muse2/muse/widgets/knob.cpp
@@ -115,6 +115,9 @@ void Knob::setTotalAngle (double angle)
void Knob::setRange(double vmin, double vmax, double vstep, int pagesize)
{
+ //if(vmin == d_minValue && vmax == d_maxValue && vstep == d_step && pageSize == d_pageSize) // p4.0.45
+ // return;
+
// divide by zero protection. probably too cautious
if (! (vmin == vmax || qMax(-vmin, vmax) == 0))
{
diff --git a/muse2/muse/widgets/meter.cpp b/muse2/muse/widgets/meter.cpp
index d9ca8e20..f46f17c1 100644
--- a/muse2/muse/widgets/meter.cpp
+++ b/muse2/muse/widgets/meter.cpp
@@ -217,6 +217,9 @@ void Meter::resetPeaks()
void Meter::setRange(double min, double max)
{
+ if(min == minScale && max == maxScale) // p4.0.45
+ return;
+
minScale = min;
maxScale = max;
cur_yv = -1; // Force re-initialization.
diff --git a/muse2/muse/widgets/visibletracks.cpp b/muse2/muse/widgets/visibletracks.cpp
index 4976ecf9..e314d0fe 100644
--- a/muse2/muse/widgets/visibletracks.cpp
+++ b/muse2/muse/widgets/visibletracks.cpp
@@ -82,7 +82,7 @@ VisibleTracks::VisibleTracks(QWidget* parent, const char*)
// Note: Does not take ownership.
addActions(action->actions());
- connect(action, SIGNAL(selected(QAction*)), SLOT(visibilityChanged(QAction*)));
+ connect(action, SIGNAL(triggered(QAction*)), SLOT(visibilityChanged(QAction*)));
}