Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 8e6e605c authored by Ralf Habacker's avatar Ralf Habacker

Fix 'No colour change for fork/join widgets possible'.

FIXED-IN:2.16.2 (KDE Applications 15.04.2)
Bug:347886
parent bb94b057
......@@ -14,8 +14,12 @@
//app includes
#include "debug_utils.h"
#include "umlview.h"
#include "umldoc.h"
#include "listpopupmenu.h"
// qt includes
#include <QColorDialog>
/**
* Constructs a ForkJoinWidget.
*
......@@ -28,6 +32,8 @@ ForkJoinWidget::ForkJoinWidget(UMLScene * scene, Qt::Orientation ori, Uml::ID::T
m_orientation(ori)
{
setSize(10, 40);
m_usesDiagramFillColor = false;
setFillColorCmd(QColor("black"));
}
/**
......@@ -64,7 +70,7 @@ void ForkJoinWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *op
Q_UNUSED(option);
Q_UNUSED(widget);
painter->fillRect(0, 0, width(), height(), QBrush(Qt::black));
painter->fillRect(0, 0, width(), height(), fillColor());
UMLWidget::paint(painter, option, widget);
}
......@@ -107,6 +113,19 @@ void ForkJoinWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement)
qElement.appendChild(fjElement);
}
/**
* Show a properties dialog for a Fork/Join Widget.
*/
void ForkJoinWidget::showPropertiesDialog()
{
QColor newColor = QColorDialog::getColor(fillColor()); // krazy:exclude=qclasses
if (newColor != fillColor()) {
setFillColor(newColor);
setUsesDiagramFillColor(false);
umlDoc()->setModified(true);
}
}
/**
* Reimplemented form UMLWidget::slotMenuSelection to handle
* Flip action.
......
......@@ -38,6 +38,8 @@ public:
virtual bool loadFromXMI(QDomElement & qElement);
virtual void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
void showPropertiesDialog();
public Q_SLOTS:
virtual void slotMenuSelection(QAction* action);
......
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