Commit 904c607d authored by L. E. Segovia's avatar L. E. Segovia

Fix uninitialized memory access in VectorControl

This is a symptom of bad design throughout SeExpr: there should be a
massive refactoring towards shared pointers and automatic deletion of
objects (especially in the UI).
For now, let's just make sure this works properly. After GSoC, we can
get back to a complete refactoring of the code.
parent 9c9442c9
......@@ -273,10 +273,14 @@ VectorControl::VectorControl(int id, VectorEditable* editable)
vbl->addWidget(edit);
_edits[i] = edit;
// piggy-back on the ExprLineEdit height to set the CSwatchFrame - amyspark
_swatch->setMinimumWidth(edit->minimumSizeHint().width());
_swatch->setMinimumHeight(edit->minimumSizeHint().height() + 6);
_swatch->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
if (_numberEditable->isColor) {
// piggy-back on the ExprLineEdit height to set the CSwatchFrame - amyspark
auto width(edit->minimumSizeHint().width());
auto height(edit->minimumSizeHint().height() + 6);
_swatch->setMinimumWidth(width);
_swatch->setMinimumHeight(height);
_swatch->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
}
ExprChannelSlider* slider = new ExprChannelSlider(i, this);
vbl->addWidget(slider);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment