projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use 0 for the index if the closest point is on the segment which closes the loop...
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
gtkmm
/
state_draw.cpp
diff --git
a/synfig-studio/trunk/src/gtkmm/state_draw.cpp
b/synfig-studio/trunk/src/gtkmm/state_draw.cpp
index
9f7f823
..
063b3a7
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/state_draw.cpp
+++ b/
synfig-studio/trunk/src/gtkmm/state_draw.cpp
@@
-377,7
+377,7
@@
StateDraw_Context::increment_id()
String str_number;
str_number=String(id,id.size()-digits,id.size());
id=String(id,0,id.size()-digits);
String str_number;
str_number=String(id,id.size()-digits,id.size());
id=String(id,0,id.size()-digits);
- synfig::info("---------------- \"%s\"",str_number.c_str());
+
//
synfig::info("---------------- \"%s\"",str_number.c_str());
number=atoi(str_number.c_str());
}
number=atoi(str_number.c_str());
}
@@
-425,8
+425,6
@@
StateDraw_Context::StateDraw_Context(CanvasView* canvas_view):
check_localerror(_("LocalError"))
{
check_localerror(_("LocalError"))
{
- synfig::info("STATE SKETCH: entering state");
-
nested=0;
load_settings();
nested=0;
load_settings();
@@
-755,8
+753,15
@@
StateDraw_Context::process_stroke(StrokeData stroke_data, WidthData width_data,
}
// If the bline only has one blinepoint, then there is nothing to do.
}
// If the bline only has one blinepoint, then there is nothing to do.
- if(bline.size()<=1)
+ if(bline.size() < 2)
+ {
+ // hide the 'stroke' line we were drawing, unless the user
+ // explicitly requests that they are kept
+ if (!getenv("SYNFIG_KEEP_ABORTED_DRAW_LINES"))
+ refresh_ducks();
+
return Smach::RESULT_OK;
return Smach::RESULT_OK;
+ }
if(region_flag)
return new_region(bline,radius);
if(region_flag)
return new_region(bline,radius);
@@
-929,6
+934,11
@@
StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
trans_bline.push_back(bline_point);
}
value_node=ValueNode_BLine::create(synfig::ValueBase(trans_bline,loop_bline_flag));
trans_bline.push_back(bline_point);
}
value_node=ValueNode_BLine::create(synfig::ValueBase(trans_bline,loop_bline_flag));
+
+ Canvas::Handle canvas(get_canvas_view()->get_canvas());
+ Layer::Handle layer(get_canvas_view()->get_selection_manager()->get_selected_layer());
+ if (layer) canvas=layer->get_canvas();
+ value_node->set_member_canvas(canvas);
}
Smach::event_result result;
}
Smach::event_result result;
@@
-999,8
+1009,7
@@
StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
LinkableValueNode::Handle::cast_dynamic(value_node->list.back().value_node)->
set_link(0,finish_duck_value_desc.get_value_node());
LinkableValueNode::Handle::cast_dynamic(value_node->list.back().value_node)->
set_link(0,finish_duck_value_desc.get_value_node());
- if(get_auto_export_flag()) {
- printf("this is where we would export the new line\n");
+ if(get_auto_export_flag())
if (!get_canvas_interface()->add_value_node(value_node,get_id()))
{
/* it's no big deal, is it? let's keep the shape anyway */
if (!get_canvas_interface()->add_value_node(value_node,get_id()))
{
/* it's no big deal, is it? let's keep the shape anyway */
@@
-1009,7
+1018,6
@@
StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
// increment_id();
// return Smach::RESULT_ERROR;
}
// increment_id();
// return Smach::RESULT_ERROR;
}
- }
last_stroke=value_node;
last_stroke_id=get_id();
last_stroke=value_node;
last_stroke_id=get_id();