summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 42dfbc1)
raw | patch | inline | side by side (parent: 42dfbc1)
author | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Sun, 31 Jan 2010 19:31:21 +0000 (20:31 +0100) | ||
committer | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Sun, 31 Jan 2010 19:31:21 +0000 (20:31 +0100) |
or transforming nodes them.
index e73c17535b6c86d324e46179d6a8a7af86f10247..297d19c10b92603cf6b174d54f6327471b0c9a0d 100644 (file)
" font_sample=\"AaBbCcIiPpQq12369$\342\202\254\302\242?.;/()\"\n"
" show_sample_in_list=\"1\"\n"
" style=\"fill:black;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;font-style:normal;font-weight:normal;font-size:40px;\" selcue=\"1\"/>\n"
-" <eventcontext id=\"nodes\" selcue=\"1\" gradientdrag=\"1\" highlight_color=\"4278190335\" pathflash_enabled=\"1\" pathflash_unselected=\"0\" pathflash_timeout=\"500\" show_handles=\"1\" show_outline=\"0\" sculpting_profile=\"1\" single_node_transform_handles=\"0\" show_transform_handles=\"0\" />\n"
+" <eventcontext id=\"nodes\" selcue=\"1\" gradientdrag=\"1\" highlight_color=\"4278190335\" pathflash_enabled=\"1\" pathflash_unselected=\"0\" pathflash_timeout=\"500\" show_handles=\"1\" show_outline=\"0\" sculpting_profile=\"1\" single_node_transform_handles=\"0\" show_transform_handles=\"0\" live_outline=\"1\" live_objects=\"1\" />\n"
" <eventcontext id=\"tweak\" selcue=\"0\" gradientdrag=\"0\" show_handles=\"0\" width=\"0.2\" force=\"0.2\" fidelity=\"0.5\" usepressure=\"1\" style=\"fill:red;stroke:none;\" usecurrent=\"0\"/>\n"
" <eventcontext id=\"spray\" selcue=\"0\" gradientdrag=\"0\" show_handles=\"0\" width=\"0.2\" force=\"0.2\" fidelity=\"0.5\" usepressure=\"1\" style=\"fill:red;stroke:none;\" usecurrent=\"0\"/>\n"
" <eventcontext id=\"gradient\" selcue=\"1\"/>\n"
index 2e4a72f666e21f80c84724ce9681d4fd1edfbd0b..961c7dff7f43d7426fd2c4a517f5677991edbef7 100644 (file)
_page_node.add_line( false, "", _t_node_pathoutline_color, "", _("Selects the color used for showing the path outline."), false);
_t_node_show_outline.init(_("Always show outline"), "/tools/nodes/show_outline", false);
_page_node.add_line( true, "", _t_node_show_outline, "", _("Show outlines for all paths, not only invisible paths"));
+ _t_node_live_outline.init(_("Update outline when dragging nodes"), "/tools/nodes/live_outline", false);
+ _page_node.add_line( true, "", _t_node_live_outline, "", _("Update the outline when dragging or transforming nodes. If this is off, the outline will only update when completing a drag."));
+ _t_node_live_objects.init(_("Update paths when dragging nodes"), "/tools/nodes/live_objects", false);
+ _page_node.add_line( true, "", _t_node_live_objects, "", _("Update pahs when dragging or transforming nodes. If this is off, paths will only be updated when completing a drag."));
_t_node_show_path_direction.init(_("Show path direction on outlines"), "/tools/nodes/show_path_direction", false);
_page_node.add_line( true, "", _t_node_show_path_direction, "", _("Visualize the direction of selected paths by drawing small arrows in the middle of each outline segment"));
_t_node_pathflash_enabled.init ( _("Show temporary path outline"), "/tools/nodes/pathflash_enabled", false);
index 46542b0e16b87cd0572a0b7366f4c88cd2d2f44c..49c84728759316d852c783bfdf5ed112e01c3a91 100644 (file)
_t_sel_cue_box, _t_bbox_visual, _t_bbox_geometric;
PrefCheckButton _t_cvg_keep_objects, _t_cvg_convert_whole_groups;
PrefCheckButton _t_node_show_outline;
+ PrefCheckButton _t_node_live_outline;
+ PrefCheckButton _t_node_live_objects;
PrefCheckButton _t_node_pathflash_enabled;
PrefCheckButton _t_node_pathflash_selected;
PrefSpinButton _t_node_pathflash_timeout;
index d1138abd5c32686c1fe5eb77d1be1fa25f18396b..734ddf15b4890619b41babe2f3ab62483dd6d900 100644 (file)
// always show outlines for clips and masks
newpm->showOutline(_show_outline || r.role != SHAPE_ROLE_NORMAL);
newpm->showPathDirection(_show_path_direction);
+ newpm->setLiveOutline(_live_outline);
+ newpm->setLiveObjects(_live_objects);
_mmap.insert(std::make_pair(r, newpm));
}
}
_show_path_direction = show;
}
+/** @brief Set live outline update status
+ * When set to true, outline will be updated continuously when dragging
+ * or transforming nodes. Otherwise it will only update when changes are committed
+ * to XML. */
+void MultiPathManipulator::setLiveOutline(bool set)
+{
+ invokeForAll(&PathManipulator::setLiveOutline, set);
+ _live_outline = set;
+}
+
+/** @brief Set live object update status
+ * When set to true, objects will be updated continuously when dragging
+ * or transforming nodes. Otherwise they will only update when changes are committed
+ * to XML. */
+void MultiPathManipulator::setLiveObjects(bool set)
+{
+ invokeForAll(&PathManipulator::setLiveObjects, set);
+ _live_objects = set;
+}
+
void MultiPathManipulator::updateOutlineColors()
{
//for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) {
index 151e153ecc9036931cfb2f0ecaf71e8807100bd4..121818f97b54245aac25a301232ab41b272b6386 100644 (file)
void showOutline(bool show);
void showHandles(bool show);
void showPathDirection(bool show);
+ void setLiveOutline(bool set);
+ void setLiveObjects(bool set);
void updateOutlineColors();
sigc::signal<void> signal_coords_changed; /// Emitted whenever the coordinates
bool _show_handles;
bool _show_outline;
bool _show_path_direction;
+ bool _live_outline;
+ bool _live_objects;
friend class PathManipulator;
};
index 08d893855e99715026bee88203ab1ac34295f798..0c4599e52f5423b7d558cdc59319bd77c37598e3 100644 (file)
// read prefs before adding items to selection to prevent momentarily showing the outline
sp_event_context_read(nt, "show_handles");
sp_event_context_read(nt, "show_outline");
+ sp_event_context_read(nt, "live_outline");
+ sp_event_context_read(nt, "live_objects");
sp_event_context_read(nt, "show_path_direction");
sp_event_context_read(nt, "show_transform_handles");
sp_event_context_read(nt, "single_node_transform_handles");
@@ -316,6 +318,12 @@ void ink_node_tool_set(SPEventContext *ec, Inkscape::Preferences::Entry *value)
} else if (entry_name == "show_outline") {
nt->show_outline = value->getBool();
nt->_multipath->showOutline(nt->show_outline);
+ } else if (entry_name == "live_outline") {
+ nt->live_outline = value->getBool();
+ nt->_multipath->setLiveOutline(nt->live_outline);
+ } else if (entry_name == "live_objects") {
+ nt->live_objects = value->getBool();
+ nt->_multipath->setLiveObjects(nt->live_objects);
} else if (entry_name == "show_path_direction") {
nt->show_path_direction = value->getBool();
nt->_multipath->showPathDirection(nt->show_path_direction);
index 65b16ff72172e8ffb80a2bc0da335cb70bc176ef..130e1619815028253c3300ad82e2df2358556ce9 100644 (file)
--- a/src/ui/tool/node-tool.h
+++ b/src/ui/tool/node-tool.h
unsigned cursor_drag : 1;
unsigned show_outline : 1;
+ unsigned live_outline : 1;
+ unsigned live_objects : 1;
unsigned show_path_direction : 1;
unsigned show_transform_handles : 1;
unsigned single_node_transform_handles : 1;
index 2d4df86f36ad25ea71854dd671b5abe380853356..0ce02aa95e504ca048af83b52f15393693d39a95 100644 (file)
, _num_selected(0)
, _show_handles(true)
, _show_outline(false)
+ , _show_path_direction(false)
+ , _live_outline(true)
+ , _live_objects(true)
, _lpe_key(lpe_key)
{
if (_lpe_key.empty()) {
_path = 0;
}
_observer->unblock();
+
+ if (!empty()) {
+ if (!_live_outline)
+ _updateOutline();
+ if (!_live_objects)
+ _setGeometry();
+ }
}
/** Remove all nodes from the path. */
_updateOutline();
}
+void PathManipulator::setLiveOutline(bool set)
+{
+ _live_outline = set;
+}
+
+void PathManipulator::setLiveObjects(bool set)
+{
+ _live_objects = set;
+}
+
void PathManipulator::setControlsTransform(Geom::Matrix const &tnew)
{
Geom::Matrix delta = _i2d_transform.inverse() * _edit_transform.inverse() * tnew * _i2d_transform;
}
builder.finish();
_spcurve->set_pathvector(builder.peek() * (_edit_transform * _i2d_transform).inverse());
- _updateOutline();
- _setGeometry();
+ if (_live_outline)
+ _updateOutline();
+ if (_live_objects)
+ _setGeometry();
}
/** Build one segment of the geometric representation.
index 4c7313a5f408291b0b1a98e5be6b8f6ebeb168dc..6b69e226a7665effc6a0e4d5548f8e8a2351af07 100644 (file)
void showOutline(bool show);
void showHandles(bool show);
void showPathDirection(bool show);
+ void setLiveOutline(bool set);
+ void setLiveObjects(bool set);
void setControlsTransform(Geom::Matrix const &);
void hideDragPoint();
bool _show_handles;
bool _show_outline;
bool _show_path_direction;
+ bool _live_outline;
+ bool _live_objects;
Glib::ustring _lpe_key;
friend class PathManipulatorObserver;