summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es>2017-08-29 10:02:38 +0000
committerJabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es>2017-08-29 10:02:38 +0000
commit5451be0409b994cf8ecb9590138fb2464ffa74a0 (patch)
tree2007033291bcdffbafaf6f292cadaca7b2bf960b /src
parentRemove LPE Simplify from spiro and BSpline mode because made uncontrolable pa... (diff)
downloadinkscape-5451be0409b994cf8ecb9590138fb2464ffa74a0.tar.gz
inkscape-5451be0409b994cf8ecb9590138fb2464ffa74a0.zip
Ressurrect Spiro Symplify by LPE because no wrong results and retain removed in bspline mode
Diffstat (limited to 'src')
-rw-r--r--src/ui/tools/freehand-base.cpp2
-rw-r--r--src/widgets/pencil-toolbar.cpp9
2 files changed, 7 insertions, 4 deletions
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp
index fdc70af18..4313c4e29 100644
--- a/src/ui/tools/freehand-base.cpp
+++ b/src/ui/tools/freehand-base.cpp
@@ -322,7 +322,7 @@ static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item,
bool simplify = prefs->getInt(tool_name(dc) + "/simplify", 0);
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
guint mode = prefs->getInt("/tools/freehand/pencil/freehand-mode", 0);
- if(simplify && mode == 0){
+ if(simplify && mode != 2){
double tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0);
tol = tol/(100.0*(102.0-tol));
std::ostringstream ss;
diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp
index 11a5c273f..d1b6a43bb 100644
--- a/src/widgets/pencil-toolbar.cpp
+++ b/src/widgets/pencil-toolbar.cpp
@@ -86,10 +86,13 @@ static void freehand_mode_changed(EgeSelectOneAction* act, GObject* tbl)
}
if (mode == 1 || mode == 2) {
gtk_action_set_visible( GTK_ACTION( g_object_get_data(tbl, "flatten_spiro_bspline") ), true );
+ } else {
+ gtk_action_set_visible( GTK_ACTION( g_object_get_data(tbl, "flatten_spiro_bspline") ), false );
+ }
+ if (mode == 2) {
gtk_action_set_visible( GTK_ACTION( g_object_get_data(tbl, "flatten_simplify") ), false );
gtk_action_set_visible( GTK_ACTION( g_object_get_data(tbl, "simplify") ), false );
} else {
- gtk_action_set_visible( GTK_ACTION( g_object_get_data(tbl, "flatten_spiro_bspline") ), false );
gtk_action_set_visible( GTK_ACTION( g_object_get_data(tbl, "flatten_simplify") ), true );
gtk_action_set_visible( GTK_ACTION( g_object_get_data(tbl, "simplify") ), true );
}
@@ -488,7 +491,7 @@ void sp_pencil_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb
g_signal_connect_after( G_OBJECT(itact), "toggled", G_CALLBACK(freehand_simplify_lpe), holder) ;
gtk_action_group_add_action( mainActions, GTK_ACTION(itact) );
guint freehandMode = prefs->getInt("/tools/freehand/pencil/freehand-mode", 0);
- if (freehandMode == 1 || freehandMode == 2) {
+ if (freehandMode == 2) {
gtk_action_set_visible( GTK_ACTION( g_object_get_data(holder, "simplify") ), false );
} else {
gtk_action_set_visible( GTK_ACTION( g_object_get_data(holder, "simplify") ), true );
@@ -505,7 +508,7 @@ void sp_pencil_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb
gtk_action_group_add_action( mainActions, GTK_ACTION(inky) );
g_object_set_data( holder, "flatten_simplify", inky );
guint freehandMode = prefs->getInt("/tools/freehand/pencil/freehand-mode", 0);
- if (freehandMode == 1 || freehandMode == 2 || !prefs->getInt("/tools/freehand/pencil/simplify", 0)) {
+ if (freehandMode == 2 || !prefs->getInt("/tools/freehand/pencil/simplify", 0)) {
gtk_action_set_visible( GTK_ACTION( g_object_get_data(holder, "flatten_simplify") ), false );
} else {
gtk_action_set_visible( GTK_ACTION( g_object_get_data(holder, "flatten_simplify") ), true );