From 0ab77f7e905780708699eb6f253ddf1def4076f2 Mon Sep 17 00:00:00 2001 From: bsongis Date: Wed, 26 Mar 2014 07:25:25 +0100 Subject: [PATCH] Issue #865 fixed --- companion/src/modeledit/channels.cpp | 3 +++ companion/src/modeledit/customfunctions.cpp | 12 +++++++----- companion/src/modeledit/logicalswitches.cpp | 3 +++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/companion/src/modeledit/channels.cpp b/companion/src/modeledit/channels.cpp index 3a6904b48..94c21e79d 100644 --- a/companion/src/modeledit/channels.cpp +++ b/companion/src/modeledit/channels.cpp @@ -125,6 +125,9 @@ Channels::Channels(QWidget * parent, ModelData & model): gridLayout->addWidget(symlimits, i+1, col++, 1, 1); } } + + QSpacerItem * verticalSpacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + gridLayout->addItem(verticalSpacer, GetEepromInterface()->getCapability(Outputs)+1, 0, 1, 1); } Channels::~Channels() diff --git a/companion/src/modeledit/customfunctions.cpp b/companion/src/modeledit/customfunctions.cpp index 058fe9e8a..2bd25ddc3 100644 --- a/companion/src/modeledit/customfunctions.cpp +++ b/companion/src/modeledit/customfunctions.cpp @@ -54,11 +54,10 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model, { QGridLayout * gridLayout = new QGridLayout(this); - int col = 1; - addLabel(gridLayout, tr("Switch"), col++); - addLabel(gridLayout, tr("Action"), col++); - addLabel(gridLayout, tr("Parameters"), col++); - addLabel(gridLayout, tr("Enable"), col++); + addLabel(gridLayout, tr("Switch"), 1); + addLabel(gridLayout, tr("Action"), 2); + addLabel(gridLayout, tr("Parameters"), 3); + addLabel(gridLayout, tr("Enable"), 4); lock = true; int num_fsw = GetEepromInterface()->getCapability(CustomFunctions); @@ -189,6 +188,9 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model, connect(fswtchEnable[i], SIGNAL(stateChanged(int)), this, SLOT(customFunctionEdited())); } + QSpacerItem * verticalSpacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + gridLayout->addItem(verticalSpacer, num_fsw+1, 0); + lock = false; } diff --git a/companion/src/modeledit/logicalswitches.cpp b/companion/src/modeledit/logicalswitches.cpp index 5b0831eea..f6f7ab460 100644 --- a/companion/src/modeledit/logicalswitches.cpp +++ b/companion/src/modeledit/logicalswitches.cpp @@ -114,6 +114,9 @@ LogicalSwitchesPanel::LogicalSwitchesPanel(QWidget * parent, ModelData & model): } } + QSpacerItem * verticalSpacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + gridLayout->addItem(verticalSpacer, GetEepromInterface()->getCapability(LogicalSwitches)+1, 0, 1, 1); + lock = false; }