summaryrefslogtreecommitdiffstats
path: root/src/widgets/arc-toolbar.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2013-10-08 10:22:49 +0000
committertavmjong-free <tavmjong@free.fr>2013-10-08 10:22:49 +0000
commitf5d74fe46345673252807be3b6812bbb0469e457 (patch)
tree2dd29c409d36d5dbfbe008cfff774880fd310b3d /src/widgets/arc-toolbar.cpp
parentcppcheck (diff)
downloadinkscape-f5d74fe46345673252807be3b6812bbb0469e457.tar.gz
inkscape-f5d74fe46345673252807be3b6812bbb0469e457.zip
Seamlessly switch between SVG circle, ellipse, and path (arc) elements while using the Circle, Ellipse, and Arc tool.
(bzr r12670)
Diffstat (limited to 'src/widgets/arc-toolbar.cpp')
-rw-r--r--src/widgets/arc-toolbar.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/widgets/arc-toolbar.cpp b/src/widgets/arc-toolbar.cpp
index c31c61e32..5569780e7 100644
--- a/src/widgets/arc-toolbar.cpp
+++ b/src/widgets/arc-toolbar.cpp
@@ -112,10 +112,9 @@ sp_arctb_startend_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const *v
{
SPItem *item = SP_ITEM(items->data);
- if (SP_IS_ARC(item) && SP_IS_GENERICELLIPSE(item)) {
+ if (SP_IS_GENERICELLIPSE(item)) {
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
- SPArc *arc = SP_ARC(item);
if (!strcmp(value_name, "start")) {
ge->start = (gtk_adjustment_get_value(adj) * M_PI)/ 180;
@@ -124,8 +123,8 @@ sp_arctb_startend_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const *v
}
ge->normalize();
- (SP_OBJECT(arc))->updateRepr();
- (SP_OBJECT(arc))->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
+ (SP_OBJECT(ge))->updateRepr();
+ (SP_OBJECT(ge))->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
modmade = true;
}
@@ -181,7 +180,7 @@ static void sp_arctb_open_state_changed( EgeSelectOneAction *act, GObject *tbl )
items = items->next)
{
SPItem *item = reinterpret_cast<SPItem*>(items->data);
- if (SP_IS_ARC(item)) {
+ if (SP_IS_GENERICELLIPSE(item)) {
Inkscape::XML::Node *repr = item->getRepr();
repr->setAttribute("sodipodi:open", "true");
item->updateRepr();
@@ -194,7 +193,7 @@ static void sp_arctb_open_state_changed( EgeSelectOneAction *act, GObject *tbl )
items = items->next)
{
SPItem *item = reinterpret_cast<SPItem *>(items->data);
- if (SP_IS_ARC(item)) {
+ if (SP_IS_GENERICELLIPSE(item)) {
Inkscape::XML::Node *repr = item->getRepr();
repr->setAttribute("sodipodi:open", NULL);
item->updateRepr();
@@ -286,7 +285,7 @@ static void sp_arc_toolbox_selection_changed(Inkscape::Selection *selection, GOb
items = items->next)
{
SPItem *item = reinterpret_cast<SPItem *>(items->data);
- if (SP_IS_ARC(item)) {
+ if (SP_IS_GENERICELLIPSE(item)) {
n_selected++;
repr = item->getRepr();
}