This ended up off-list. I'm forwarding it back to the list and adding:
I leave it to you as an exercise to figure out how to solve:
Mouse wheeling over the combo box makes m_vibratoBox show and hide
itself like you wanted, but when this widget is hidden, the layout gets
all stretched out, and more importantly, the combo box is no longer
sitting under the mouse cursor, so you can't roll through smoothly.
There's some way to fix that with spacers, stretch, strut, or some
combination thereof, and I have honestly just never been worth a damn
with any of that stuff. I dicked around with it for a bit, but I'm
giving up, and leaving it to you to figure out. Or not, as you prefer.
Since it's harder to see the patches now, I'm going to paste a copy for
your perusal:
Index: src/gui/dialogs/PitchBendSequenceDialog.cpp
===================================================================
--- src/gui/dialogs/PitchBendSequenceDialog.cpp (revision 13392)
+++ src/gui/dialogs/PitchBendSequenceDialog.cpp (working copy)
@@ -231,7 +231,7 @@
(whatVaries == Pitch) ? tr("Vibrato") :
(whatVaries == Volume) ? tr("Tremolo") :
tr("LFO");
- QGroupBox *m_vibratoBox = new QGroupBox(vibratoBoxText);
+ m_vibratoBox = new QGroupBox(vibratoBoxText);
m_vibratoBox->
setToolTip(tr("<qt>Low-frequency oscillation for this
controller. This is only possible when Ramp mode is linear and <i>Use
this many steps</i> is set.</qt>"));
m_vibratoBox->setContentsMargins(5, 5, 5, 5);
@@ -351,8 +351,8 @@
slotSequencePresetChanged(m_sequencePreset->currentIndex());
- slotStepSizeStyleChanged(true);
- maybeEnableVibratoFields();
+ // the above called slotStepSizeStyleChanged() which called
+ // maybeEnableVibratoFields()
m_radioReplace->setChecked(true);
connect(m_sequencePreset, SIGNAL(activated(int)), this,
@@ -413,7 +413,7 @@
m_vibratoFrequency->setEnabled(false);
} else {
slotStepSizeStyleChanged(true);
- maybeEnableVibratoFields();
+ //maybeEnableVibratoFields();
}
}
@@ -424,10 +424,7 @@
m_radioRampLinear->isChecked() &&
m_radioStepSizeByCount->isChecked();
- m_vibratoStartAmplitude->setEnabled(enable);
- m_vibratoEndAmplitude->setEnabled(enable);
- m_vibratoFrequency->setEnabled(enable);
- // show()/hide() on m_vibratoBox is buggy so we don't use it.
+ m_vibratoBox->setVisible(enable);
}
void
@@ -495,7 +492,7 @@
}
}
slotStepSizeStyleChanged(true);
- maybeEnableVibratoFields();
+ // the above called maybeEnableVibratoFields();
}
bool
-------- Original Message --------
Subject: Re: [Rosegarden-devel] Fixed Qt warnings on PitchBendDialogSequence
Date: Tue, 03 Sep 2013 07:05:13 -0400
From: D. Michael McIntyre <[email protected]>
To: Tom Breton (Tehom) <[email protected]>
> // show()/hide() on m_vibratoBox is buggy so we don't use it.
> if(!enable)
> { m_vibratoBox->hide(enable); }
Bang!
I looked at it over a dozen times before I saw the problem, but now I'm
sure I know why this is taking a crap.
It's super easy to do this in Qt:
foo.h:
QThingie *m_myThingie;
foo.cpp:
ctor {
QThingie *m_myThingie = new QThingie();
}
Foo::memberFunction() {
m_myThingie->doSomething();
}
The call to m_myThingie->doSomething() goes KABLOOEY!!! because
m_myThingie within the ctor is a local variable, and m_myThingie
accessed from any member function is a null pointer.
Do you see the dumb dumb now? It should have been:
m_myThingie = new QThingie();
Congratulations, I think you just joined a club or something. I
remember having this conversation with Guillaume Laurent after I had
made the same stupid mistake when I first started out, and then I
remember Chris Cannam finding my having made the same error again much
later.
It's easy to do.
I'll clean up the mess and commit this fix. Haven't compiled it yet,
but I bet you $1 it will solve the problem.
--
D. Michael McIntyre
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel