diff --git a/src/Mod/TechDraw/Gui/TaskLineDecor.cpp b/src/Mod/TechDraw/Gui/TaskLineDecor.cpp index 63a748ea3b45..4244c251a2a8 100644 --- a/src/Mod/TechDraw/Gui/TaskLineDecor.cpp +++ b/src/Mod/TechDraw/Gui/TaskLineDecor.cpp @@ -69,10 +69,10 @@ TaskLineDecor::TaskLineDecor(TechDraw::DrawViewPart* partFeat, getDefaults(); ui->setupUi(this); - connect(ui->cb_Style, SIGNAL(currentIndexChanged( int )), this, SLOT(onStyleChanged(void))); - connect(ui->cc_Color, SIGNAL(changed( )), this, SLOT(onColorChanged(void))); - connect(ui->dsb_Weight, SIGNAL(valueChanged( double )), this, SLOT(onWeightChanged( void ))); - connect(ui->cb_Visible, SIGNAL(currentIndexChanged( int )), this, SLOT(onVisibleChanged( void ))); + connect(ui->cb_Style, SIGNAL(currentIndexChanged(int)), this, SLOT(onStyleChanged(void))); + connect(ui->cc_Color, SIGNAL(changed()), this, SLOT(onColorChanged(void))); + connect(ui->dsb_Weight, SIGNAL(valueChanged(double)), this, SLOT(onWeightChanged(void))); + connect(ui->cb_Visible, SIGNAL(currentIndexChanged(int)), this, SLOT(onVisibleChanged(void))); initUi(); } @@ -101,6 +101,7 @@ void TaskLineDecor::initUi() ui->cb_Style->setCurrentIndex(m_style - 1); //combobox does not have 0:NoLine choice ui->cc_Color->setColor(m_color.asValue()); ui->dsb_Weight->setValue(m_weight); + ui->dsb_Weight->setSingleStep(0.1); ui->cb_Visible->setCurrentIndex(m_visible); } @@ -157,25 +158,29 @@ void TaskLineDecor::getDefaults(void) void TaskLineDecor::onStyleChanged(void) { m_style = ui->cb_Style->currentIndex() + 1; - //livePreview(); + applyDecorations(); + m_partFeat->requestPaint(); } void TaskLineDecor::onColorChanged(void) { m_color.setValue(ui->cc_Color->color()); - //livePreview(); + applyDecorations(); + m_partFeat->requestPaint(); } void TaskLineDecor::onWeightChanged(void) { m_weight = ui->dsb_Weight->value(); - //livePreview(); + applyDecorations(); + m_partFeat->requestPaint(); } void TaskLineDecor::onVisibleChanged(void) { m_visible = ui->cb_Visible->currentIndex(); - //livePreview(); + applyDecorations(); + m_partFeat->requestPaint(); } void TaskLineDecor::applyDecorations(void) diff --git a/src/Mod/TechDraw/Gui/TaskLineDecor.ui b/src/Mod/TechDraw/Gui/TaskLineDecor.ui index 46f111cf4263..9092dc2aee00 100644 --- a/src/Mod/TechDraw/Gui/TaskLineDecor.ui +++ b/src/Mod/TechDraw/Gui/TaskLineDecor.ui @@ -6,12 +6,12 @@ 0 0 - 395 - 294 + 350 + 200 - + 0 0 @@ -25,215 +25,177 @@ Line Decoration - + - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - - false - - - - - - - Lines - - - - - - - View - - - - - - - false - - - false - - - Qt::NoFocus - - - false - - - - - - - - - Qt::Vertical + + + + + View + + + + + + + false + + + false + + + Qt::NoFocus + + + false + + + + + + + Lines + + + + + + + false + + + + + + + Qt::Horizontal + + + + + + + Style + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 40 + 20 + + + + + + + + 0 + + + + Continuous - - - 20 - 40 - + + + + Dash - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Color - - - - - - - Style - - - - - - - Weight - - - - - - - - 0 - 0 - 0 - - - - - - - - Thickness of pattern lines. - - - 0.500000000000000 - - - - - - - Visible - - - - - - - 1 - - - 2 - - - 2 - - - 2 - - - - False - - - - - True - - - - - - - - 0 - - - - Continuous - - - - - Dash - - - - - Dot - - - - - DashDot - - - - - DashDotDot - - - - - - - - - - Qt::Vertical + + + + Dot - - - 20 - 40 - + + + + DashDot - - - - + + + + DashDotDot + + + + + + + + Color + + + + + + + + 0 + 0 + 0 + + + + + + + + Weight + + + + + + + Thickness of pattern lines. + + + 0.500000000000000 + + + + + + + Visible + + + + + + + 1 + + + 2 + + + 2 + + + 2 + + + + False + + + + + True + + + + +