summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/Whiteboard/GView.cpp')
-rw-r--r--Swift/QtUI/Whiteboard/GView.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/Swift/QtUI/Whiteboard/GView.cpp b/Swift/QtUI/Whiteboard/GView.cpp
index b26f0bb..2c2f849 100644
--- a/Swift/QtUI/Whiteboard/GView.cpp
+++ b/Swift/QtUI/Whiteboard/GView.cpp
@@ -34,6 +34,7 @@ namespace Swift {
} else {
defaultPen.setColor(color);
}
+ lineColorChanged(color);
}
QColor GView::getLineColor() {
@@ -49,8 +50,7 @@ namespace Swift {
} else {
defaultBrush.setColor(color);
}
-
-// brush.setStyle(Qt::SolidPattern);
+ brushColorChanged(color);
}
QColor GView::getBrushColor() {
@@ -99,6 +99,8 @@ namespace Swift {
pen.setWidth(1);
defaultPen = pen;
lineWidthChanged(1);
+ lineColorChanged(pen.color());
+ brushColorChanged(brush.color());
}
QGraphicsItem* GView::getItem(QString id) {
@@ -438,6 +440,8 @@ namespace Swift {
ellipseItem->setPen(pen);
ellipseItem->setBrush(brush);
}
+ lineColorChanged(pen.color());
+ brushColorChanged(brush.color());
}
void GView::setActualPenAndBrushFromItem(QGraphicsItem* item) {
@@ -474,6 +478,8 @@ namespace Swift {
brush = ellipseItem->brush();
}
lineWidthChanged(pen.width());
+ lineColorChanged(pen.color());
+ brushColorChanged(brush.color());
}
void GView::deselect() {
@@ -484,6 +490,8 @@ namespace Swift {
delete selectionRect;
selectionRect = 0;
lineWidthChanged(pen.width());
+ lineColorChanged(pen.color());
+ brushColorChanged(brush.color());
}
}
@@ -497,6 +505,8 @@ namespace Swift {
delete selectionRect;
selectionRect = 0;
lineWidthChanged(pen.width());
+ lineColorChanged(pen.color());
+ brushColorChanged(brush.color());
}
}
}