diff options
-rw-r--r-- | muse/ChangeLog | 3 | ||||
-rw-r--r-- | muse/muse/app.cpp | 73 | ||||
-rw-r--r-- | muse/muse/mixer/amixer.cpp | 6 | ||||
-rw-r--r-- | muse/muse/widgets/genset.cpp | 108 | ||||
-rw-r--r-- | muse/muse/widgets/genset.h | 4 |
5 files changed, 157 insertions, 37 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog index ca5b6193..8714afe1 100644 --- a/muse/ChangeLog +++ b/muse/ChangeLog @@ -1,3 +1,6 @@ +21.09.2010 + * Fixed: Mixers not restoring their size properly upon song load. (T356) + - Rearranged MusE::loadProjectFile1() slightly so mixer resizing done at end. Tested OK. 16.09.2010 * Created rc2 release for 1.1 (rj) * Fixed: Delete track(s) not disconnecting track routes, causing routes to hang around and store in song file. (T356) diff --git a/muse/muse/app.cpp b/muse/muse/app.cpp index b8aca409..4d8586a5 100644 --- a/muse/muse/app.cpp +++ b/muse/muse/app.cpp @@ -1591,51 +1591,22 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool loadAll showMixer2(config.mixer2Visible); // Added p3.3.43 Make sure the geometry is correct because showMixerX() will NOT - // set the geometry if the mixer has already been created, which caused a very - // skinny mixer if enough strips were added to cause a horizontal scrollbar to appear. - // If no horizontal scrollbar had appeared, then everything was displayed OK. - // FIXME: Resize not working for some reason if mixer is already created ! + // set the geometry if the mixer has already been created. if(mixer1) { - if(mixer1->geometry().size() != config.mixer1.geometry.size()) - { - //printf("MusE::loadProjectFile1 resizing mixer1 x:%d y:%d w:%d h:%d\n", config.mixer1.geometry.x(), - // config.mixer1.geometry.y(), - // config.mixer1.geometry.width(), - // config.mixer1.geometry.height() - // ); - mixer1->resize(config.mixer1.geometry.size()); - } + //if(mixer1->geometry().size() != config.mixer1.geometry.size()) // p3.3.53 Moved below + // mixer1->resize(config.mixer1.geometry.size()); + if(mixer1->geometry().topLeft() != config.mixer1.geometry.topLeft()) - { - //printf("MusE::loadProjectFile1 moving mixer1 x:%d y:%d w:%d h:%d\n", config.mixer1.geometry.x(), - // config.mixer1.geometry.y(), - // config.mixer1.geometry.width(), - // config.mixer1.geometry.height() - // ); mixer1->move(config.mixer1.geometry.topLeft()); - } } if(mixer2) { - if(mixer2->geometry().size() != config.mixer2.geometry.size()) - { - //printf("MusE::loadProjectFile1 resizing mixer2 x:%d y:%d w:%d h:%d\n", config.mixer2.geometry.x(), - // config.mixer2.geometry.y(), - // config.mixer2.geometry.width(), - // config.mixer2.geometry.height() - // ); - mixer2->resize(config.mixer2.geometry.size()); - } + //if(mixer2->geometry().size() != config.mixer2.geometry.size()) // p3.3.53 Moved below + // mixer2->resize(config.mixer2.geometry.size()); + if(mixer2->geometry().topLeft() != config.mixer2.geometry.topLeft()) - { - //printf("MusE::loadProjectFile1 moving mixer2 x:%d y:%d w:%d h:%d\n", config.mixer2.geometry.x(), - // config.mixer2.geometry.y(), - // config.mixer2.geometry.width(), - // config.mixer2.geometry.height() - // ); mixer2->move(config.mixer2.geometry.topLeft()); - } } showMarker(config.markerVisible); @@ -1656,6 +1627,36 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool loadAll song->updatePos(); clipboardChanged(); // enable/disable "Paste" selectionChanged(); // enable/disable "Copy" & "Paste" + + // p3.3.53 Try this AFTER the song update above which does a mixer update... Tested OK - mixers resize properly now. + if (loadAll) + { + if(mixer1) + { + if(mixer1->geometry().size() != config.mixer1.geometry.size()) + { + //printf("MusE::loadProjectFile1 resizing mixer1 x:%d y:%d w:%d h:%d\n", config.mixer1.geometry.x(), + // config.mixer1.geometry.y(), + // config.mixer1.geometry.width(), + // config.mixer1.geometry.height() + // ); + mixer1->resize(config.mixer1.geometry.size()); + } + } + if(mixer2) + { + if(mixer2->geometry().size() != config.mixer2.geometry.size()) + { + //printf("MusE::loadProjectFile1 resizing mixer2 x:%d y:%d w:%d h:%d\n", config.mixer2.geometry.x(), + // config.mixer2.geometry.y(), + // config.mixer2.geometry.width(), + // config.mixer2.geometry.height() + // ); + mixer2->resize(config.mixer2.geometry.size()); + } + } + } + } //--------------------------------------------------------- diff --git a/muse/muse/mixer/amixer.cpp b/muse/muse/mixer/amixer.cpp index f4252cef..740e12d3 100644 --- a/muse/muse/mixer/amixer.cpp +++ b/muse/muse/mixer/amixer.cpp @@ -183,6 +183,8 @@ void AudioMixerApp::clear() void AudioMixerApp::updateMixer(UpdateAction action) { + //printf("AudioMixerApp::updateMixer action:%d\n", action); + //name = cfg->name; //setCaption(name); setCaption(cfg->name); @@ -382,9 +384,13 @@ void AudioMixerApp::updateMixer(UpdateAction action) addStrip(*i, idx++); } + //printf("AudioMixerApp::updateMixer setting maximum width:%d\n", STRIP_WIDTH * idx + __WIDTH_COMPENSATION); setMaximumWidth(STRIP_WIDTH * idx + __WIDTH_COMPENSATION); if (idx < 8) + { + //printf("AudioMixerApp::updateMixer setting minimum width:%d\n", idx * STRIP_WIDTH + __WIDTH_COMPENSATION); view->setMinimumWidth(idx * STRIP_WIDTH + __WIDTH_COMPENSATION); + } } //--------------------------------------------------------- diff --git a/muse/muse/widgets/genset.cpp b/muse/muse/widgets/genset.cpp index 5c9dc958..db23f918 100644 --- a/muse/muse/widgets/genset.cpp +++ b/muse/muse/widgets/genset.cpp @@ -124,7 +124,9 @@ GlobalSettingsConfig::GlobalSettingsConfig(QWidget* parent, const char* name) externalWavEditorSelect->setText(config.externalWavEditor); oldStyleStopCheckBox->setChecked(config.useOldStyleStopShortCut); moveArmedCheckBox->setChecked(config.moveArmedCheckBox); - + + //updateSettings(); // TESTING + connect(applyButton, SIGNAL(clicked()), SLOT(apply())); connect(okButton, SIGNAL(clicked()), SLOT(ok())); connect(cancelButton, SIGNAL(clicked()), SLOT(cancel())); @@ -136,6 +138,110 @@ GlobalSettingsConfig::GlobalSettingsConfig(QWidget* parent, const char* name) } //--------------------------------------------------------- +// updateSettings +//--------------------------------------------------------- + +void GlobalSettingsConfig::updateSettings() +{ + for (unsigned i = 0; i < sizeof(rtcResolutions)/sizeof(*rtcResolutions); ++i) { + if (rtcResolutions[i] == config.rtcTicks) { + rtcResolutionSelect->setCurrentItem(i); + break; + } + } + for (unsigned i = 0; i < sizeof(divisions)/sizeof(*divisions); ++i) { + if (divisions[i] == config.division) { + midiDivisionSelect->setCurrentItem(i); + break; + } + } + for (unsigned i = 0; i < sizeof(divisions)/sizeof(*divisions); ++i) { + if (divisions[i] == config.guiDivision) { + guiDivisionSelect->setCurrentItem(i); + break; + } + } + for (unsigned i = 0; i < sizeof(dummyAudioBufSizes)/sizeof(*dummyAudioBufSizes); ++i) { + if (dummyAudioBufSizes[i] == config.dummyAudioBufSize) { + dummyAudioSize->setCurrentItem(i); + break; + } + } + + guiRefreshSelect->setValue(config.guiRefresh); + minSliderSelect->setValue(int(config.minSlider)); + minMeterSelect->setValue(config.minMeter); + freewheelCheckBox->setChecked(config.freewheelMode); + denormalCheckBox->setChecked(config.useDenormalBias); + outputLimiterCheckBox->setChecked(config.useOutputLimiter); + vstInPlaceCheckBox->setChecked(config.vstInPlace); + dummyAudioRate->setValue(config.dummyAudioSampleRate); + + //DummyAudioDevice* dad = dynamic_cast<DummyAudioDevice*>(audioDevice); + //dummyAudioRealRate->setText(dad ? QString().setNum(sampleRate) : "---"); + dummyAudioRealRate->setText(QString().setNum(sampleRate)); + + helpBrowser->setText(config.helpBrowser); + startSongEntry->setText(config.startSong); + startSongGroup->setButton(config.startMode); + + showTransport->setChecked(config.transportVisible); + showBigtime->setChecked(config.bigTimeVisible); + //showMixer->setChecked(config.mixerVisible); + showMixer->setChecked(config.mixer1Visible); + showMixer2->setChecked(config.mixer2Visible); + + arrangerX->setValue(config.geometryMain.x()); + arrangerY->setValue(config.geometryMain.y()); + arrangerW->setValue(config.geometryMain.width()); + arrangerH->setValue(config.geometryMain.height()); + + transportX->setValue(config.geometryTransport.x()); + transportY->setValue(config.geometryTransport.y()); + + bigtimeX->setValue(config.geometryBigTime.x()); + bigtimeY->setValue(config.geometryBigTime.y()); + bigtimeW->setValue(config.geometryBigTime.width()); + bigtimeH->setValue(config.geometryBigTime.height()); + + //mixerX->setValue(config.geometryMixer.x()); + //mixerY->setValue(config.geometryMixer.y()); + //mixerW->setValue(config.geometryMixer.width()); + //mixerH->setValue(config.geometryMixer.height()); + mixerX->setValue(config.mixer1.geometry.x()); + mixerY->setValue(config.mixer1.geometry.y()); + mixerW->setValue(config.mixer1.geometry.width()); + mixerH->setValue(config.mixer1.geometry.height()); + mixer2X->setValue(config.mixer2.geometry.x()); + mixer2Y->setValue(config.mixer2.geometry.y()); + mixer2W->setValue(config.mixer2.geometry.width()); + mixer2H->setValue(config.mixer2.geometry.height()); + + //setMixerCurrent->setEnabled(muse->mixerWindow()); + setMixerCurrent->setEnabled(muse->mixer1Window()); + setMixer2Current->setEnabled(muse->mixer2Window()); + + setBigtimeCurrent->setEnabled(muse->bigtimeWindow()); + setTransportCurrent->setEnabled(muse->transportWindow()); + + showSplash->setChecked(config.showSplashScreen); + showDidYouKnow->setChecked(config.showDidYouKnow); + externalWavEditorSelect->setText(config.externalWavEditor); + oldStyleStopCheckBox->setChecked(config.useOldStyleStopShortCut); + moveArmedCheckBox->setChecked(config.moveArmedCheckBox); +} + +//--------------------------------------------------------- +// showEvent +//--------------------------------------------------------- + +void GlobalSettingsConfig::showEvent(QShowEvent* e) +{ + QDialog::showEvent(e); + //updateSettings(); // TESTING +} + +//--------------------------------------------------------- // apply //--------------------------------------------------------- diff --git a/muse/muse/widgets/genset.h b/muse/muse/widgets/genset.h index 4edd7d40..2c4a76e4 100644 --- a/muse/muse/widgets/genset.h +++ b/muse/muse/widgets/genset.h @@ -19,6 +19,7 @@ class GlobalSettingsConfig : public GlobalSettingsDialogBase { Q_OBJECT private slots: + void updateSettings(); void apply(); void ok(); void cancel(); @@ -28,6 +29,9 @@ class GlobalSettingsConfig : public GlobalSettingsDialogBase { void arrangerCurrent(); void transportCurrent(); + protected: + void showEvent(QShowEvent*); + public: GlobalSettingsConfig(QWidget* parent=0, const char* name=0); }; |