diff options
author | Tim E. Real <termtech@rogers.com> | 2012-09-07 00:38:35 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2012-09-07 00:38:35 +0000 |
commit | 3b57e61b68d727a5300722015cfde332b5bd5cdf (patch) | |
tree | 8b986e6e10c7de0be59d790a87747e9062da4251 /muse2/muse | |
parent | f54d0539f6fd26f9b326ddb6761e0a6c296ca6dc (diff) |
Bug 3555581: No synths listed in Edit menu: main.cpp: Move initMidiSynth() ahead
of MusE.
And unrelated simple change: Privatize Arranger::parentWin.
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/arranger/arranger.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/arranger/arranger.h | 3 | ||||
-rw-r--r-- | muse2/muse/arranger/pcanvas.cpp | 12 | ||||
-rw-r--r-- | muse2/muse/main.cpp | 6 |
4 files changed, 12 insertions, 11 deletions
diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp index d25aa0b9..8d2328c3 100644 --- a/muse2/muse/arranger/arranger.cpp +++ b/muse2/muse/arranger/arranger.cpp @@ -213,7 +213,7 @@ Arranger::Arranger(ArrangerView* parent, const char* name) cursVal = INT_MAX; - parentWin=parent; + _parentWin=parent; setFocusPolicy(Qt::NoFocus); diff --git a/muse2/muse/arranger/arranger.h b/muse2/muse/arranger/arranger.h index f37edd9b..dd2c5290 100644 --- a/muse2/muse/arranger/arranger.h +++ b/muse2/muse/arranger/arranger.h @@ -115,6 +115,7 @@ class Arranger : public QWidget { static QByteArray header_state; + ArrangerView* _parentWin; int _quant, _raster; PartCanvas* canvas; ScrollScale* hscroll; @@ -236,7 +237,7 @@ class Arranger : public QWidget { unsigned cursorValue() { return cursVal; } - ArrangerView* parentWin; + ArrangerView* parentWin() const { return _parentWin; } }; } // namespace MusEGui diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index 5e754e25..20c06660 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -676,18 +676,18 @@ QMenu* PartCanvas::genItemPopup(CItem* item) partPopup->addSeparator(); switch(trackType) { case MusECore::Track::MIDI: { - partPopup->addAction(MusEGlobal::muse->arranger()->parentWin->startPianoEditAction); - partPopup->addMenu(MusEGlobal::muse->arranger()->parentWin->scoreSubmenu); - partPopup->addAction(MusEGlobal::muse->arranger()->parentWin->startScoreEditAction); - partPopup->addAction(MusEGlobal::muse->arranger()->parentWin->startListEditAction); + partPopup->addAction(MusEGlobal::muse->arranger()->parentWin()->startPianoEditAction); + partPopup->addMenu(MusEGlobal::muse->arranger()->parentWin()->scoreSubmenu); + partPopup->addAction(MusEGlobal::muse->arranger()->parentWin()->startScoreEditAction); + partPopup->addAction(MusEGlobal::muse->arranger()->parentWin()->startListEditAction); QAction *act_mexport = partPopup->addAction(tr("save part to disk")); act_mexport->setData(16); } break; case MusECore::Track::NEW_DRUM: case MusECore::Track::DRUM: { - partPopup->addAction(MusEGlobal::muse->arranger()->parentWin->startDrumEditAction); - partPopup->addAction(MusEGlobal::muse->arranger()->parentWin->startListEditAction); + partPopup->addAction(MusEGlobal::muse->arranger()->parentWin()->startDrumEditAction); + partPopup->addAction(MusEGlobal::muse->arranger()->parentWin()->startListEditAction); QAction *act_dexport = partPopup->addAction(tr("save part to disk")); act_dexport->setData(16); } diff --git a/muse2/muse/main.cpp b/muse2/muse/main.cpp index 600ee79b..204bbcc6 100644 --- a/muse2/muse/main.cpp +++ b/muse2/muse/main.cpp @@ -530,6 +530,8 @@ int main(int argc, char* argv[]) MusEGui::initIcons(); + MusECore::initMidiSynth(); // Need to do this now so that Add Track -> Synth menu is populated when MusE is created. + MusEGlobal::muse = new MusEGui::MusE(); app.setMuse(MusEGlobal::muse); @@ -651,8 +653,6 @@ int main(int argc, char* argv[]) MusECore::initMetronome(); - MusECore::initMidiSynth(); - #ifdef HAVE_LASH { MusEGui::lash_client = 0; @@ -677,7 +677,7 @@ int main(int argc, char* argv[]) if (mlockall(MCL_CURRENT | MCL_FUTURE)) perror("WARNING: Cannot lock memory:"); } - + MusEGlobal::muse->show(); MusEGlobal::muse->seqStart(); |