- add missing update on changed color

- some minor code rearrangements and wording changes
This commit is contained in:
donovaly
2020-03-20 04:18:39 +01:00
committed by WandererFan
parent 14fbda341c
commit 7e60dcd734
3 changed files with 8 additions and 7 deletions

View File

@@ -83,18 +83,18 @@ TaskBalloon::TaskBalloon(QGIViewBalloon *parent, ViewProviderBalloon *balloonVP)
i = parent->dvBalloon->Shape.getValue();
ui->comboSymbol->setCurrentIndex(i);
if (m_balloonVP != nullptr)
ui->textColor->setColor(m_balloonVP->Color.getValue().asValue<QColor>());
ui->qsbFontSize->setUnit(Base::Unit::Length);
ui->qsbLineWidth->setUnit(Base::Unit::Length);
ui->qsbLineWidth->setSingleStep(0.100);
ui->qsbBalloonKink->setUnit(Base::Unit::Length);
ui->qsbFontSize->setValue(m_balloonVP->Fontsize.getValue());
ui->qsbLineWidth->setValue(m_balloonVP->LineWidth.getValue());
if (balloonVP != nullptr) {
ui->textColor->setColor(balloonVP->Color.getValue().asValue<QColor>());
ui->qsbFontSize->setValue(balloonVP->Fontsize.getValue());
ui->qsbLineWidth->setValue(balloonVP->LineWidth.getValue());
}
// new balloons have already the preferences BalloonKink length
ui->qsbBalloonKink->setValue(m_parent->dvBalloon->KinkLength.getValue());
ui->qsbBalloonKink->setValue(parent->dvBalloon->KinkLength.getValue());
}
TaskBalloon::~TaskBalloon()

View File

@@ -51,7 +51,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Font Size:</string>
<string>Fontsize:</string>
</property>
</widget>
</item>

View File

@@ -155,6 +155,7 @@ void ViewProviderBalloon::onChanged(const App::Property* p)
{
if ((p == &Font) ||
(p == &Fontsize) ||
(p == &Color) ||
(p == &LineWidth)) {
QGIView* qgiv = getQView();
if (qgiv) {