summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/selected-style.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2008-08-03 05:56:45 +0000
committerjoncruz <joncruz@users.sourceforge.net>2008-08-03 05:56:45 +0000
commit597e64a2e39d2fc4e355c447456410277b9eabf0 (patch)
tree342a0358b100ce3de2e8f5fd9e35294de122592e /src/ui/widget/selected-style.cpp
parentWarning cleanup (diff)
downloadinkscape-597e64a2e39d2fc4e355c447456410277b9eabf0.tar.gz
inkscape-597e64a2e39d2fc4e355c447456410277b9eabf0.zip
Fixed const-correctness and member access
(bzr r6544)
Diffstat (limited to 'src/ui/widget/selected-style.cpp')
-rw-r--r--src/ui/widget/selected-style.cpp39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index c0aaaaa66..3da613416 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -107,8 +107,8 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_stroke_label (_("Stroke:")),
_opacity_label (_("O:")),
- _fill_place (SS_FILL),
- _stroke_place (SS_STROKE),
+ _fill_place(this, SS_FILL),
+ _stroke_place(this, SS_STROKE),
_fill_flag_place (),
_stroke_flag_place (),
@@ -118,7 +118,7 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_opacity_sb (0.02, 0),
_stroke (),
- _stroke_width_place(),
+ _stroke_width_place(this),
_stroke_width (""),
_opacity_blocked (false),
@@ -379,10 +379,6 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
"drag_data_received",
G_CALLBACK(dragDataReceived),
_drop[SS_FILL]);
-
- _fill_place.parent = this;
- _stroke_place.parent = this;
- _stroke_width_place.parent = this;
}
SelectedStyle::~SelectedStyle()
@@ -1155,12 +1151,16 @@ void SelectedStyle::on_opacity_changed () {
/* ============================================= RotateableSwatch */
-RotateableSwatch::RotateableSwatch(guint mode) {
- fillstroke = mode;
- startcolor_set = false;
- undokey = "ssrot1";
- cr = NULL;
- cr_set = false;
+RotateableSwatch::RotateableSwatch(SelectedStyle *parent, guint mode) :
+ fillstroke(mode),
+ parent(parent),
+ startcolor(0),
+ startcolor_set(false),
+ undokey("ssrot1"),
+ cr(0),
+ cr_set(false)
+
+{
}
RotateableSwatch::~RotateableSwatch() {
@@ -1332,11 +1332,14 @@ RotateableSwatch::do_release(double by, guint modifier) {
/* ============================================= RotateableStrokeWidth */
-RotateableStrokeWidth::RotateableStrokeWidth() {
- undokey = "swrot1";
- startvalue_set = false;
- cr = NULL;
- cr_set = false;
+RotateableStrokeWidth::RotateableStrokeWidth(SelectedStyle *parent) :
+ parent(parent),
+ startvalue(0),
+ startvalue_set(false),
+ undokey("swrot1"),
+ cr(0),
+ cr_set(false)
+{
}
RotateableStrokeWidth::~RotateableStrokeWidth() {