summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es>2017-12-29 17:40:45 +0000
committerJabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es>2017-12-29 17:40:45 +0000
commit616721bb0ccc9990083361b1dd4f636f76e405fc (patch)
treeaae7eee9651bd3b7d31634591e69945c8f7ed004 /src
parentMerge branch 'master' into CloneOriginalLPEFix (diff)
downloadinkscape-616721bb0ccc9990083361b1dd4f636f76e405fc.tar.gz
inkscape-616721bb0ccc9990083361b1dd4f636f76e405fc.zip
Fix message probles on boolops and for example when moving or transforming a selection no message
Diffstat (limited to 'src')
-rw-r--r--src/object-set.h2
-rw-r--r--src/selection-describer.cpp5
-rw-r--r--src/splivarot.cpp26
3 files changed, 20 insertions, 13 deletions
diff --git a/src/object-set.h b/src/object-set.h
index a8061593a..f9f02a213 100644
--- a/src/object-set.h
+++ b/src/object-set.h
@@ -475,7 +475,7 @@ protected:
std::unordered_map<SPObject*, sigc::connection> _releaseConnections;
private:
- BoolOpErrors pathBoolOp(bool_op bop, const bool skip_undo, const unsigned int verb = SP_VERB_NONE, const Glib::ustring description = "");
+ BoolOpErrors pathBoolOp(bool_op bop, const bool skip_undo, const bool checked = false, const unsigned int verb = SP_VERB_NONE, const Glib::ustring description = "");
void _disconnect(SPObject* object);
};
diff --git a/src/selection-describer.cpp b/src/selection-describer.cpp
index 5044864a4..6e2f368f3 100644
--- a/src/selection-describer.cpp
+++ b/src/selection-describer.cpp
@@ -108,7 +108,10 @@ SelectionDescriber::~SelectionDescriber()
void SelectionDescriber::_selectionModified(Inkscape::Selection *selection, guint /*flags*/)
{
- _updateMessageFromSelection(selection);
+ //TODO: finaly drop this function
+ //This realy alwais overvrite values like moving....
+ //I think is better only show this message when selection changes
+ //_updateMessageFromSelection(selection);
}
void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *selection) {
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index f6544872f..145feda44 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -56,42 +56,42 @@ void sp_selected_path_do_offset(SPDesktop *desktop, bool expand, double prefOffs
void sp_selected_path_create_offset_object(SPDesktop *desktop, int expand, bool updating);
bool Inkscape::ObjectSet::pathUnion(const bool skip_undo) {
- BoolOpErrors result = pathBoolOp(bool_op_union, skip_undo, SP_VERB_SELECTION_UNION, _("Union"));
+ BoolOpErrors result = pathBoolOp(bool_op_union, skip_undo, false, SP_VERB_SELECTION_UNION, _("Union"));
return DONE == result;
}
bool
Inkscape::ObjectSet::pathIntersect(const bool skip_undo)
{
- BoolOpErrors result = pathBoolOp(bool_op_inters, skip_undo, SP_VERB_SELECTION_INTERSECT, _("Intersection"));
+ BoolOpErrors result = pathBoolOp(bool_op_inters, skip_undo, false, SP_VERB_SELECTION_INTERSECT, _("Intersection"));
return DONE == result;
}
bool
Inkscape::ObjectSet::pathDiff(const bool skip_undo)
{
- BoolOpErrors result = pathBoolOp(bool_op_diff, skip_undo, SP_VERB_SELECTION_DIFF, _("Difference"));
+ BoolOpErrors result = pathBoolOp(bool_op_diff, skip_undo, false, SP_VERB_SELECTION_DIFF, _("Difference"));
return DONE == result;
}
bool
Inkscape::ObjectSet::pathSymDiff(const bool skip_undo)
{
- BoolOpErrors result = pathBoolOp(bool_op_symdiff, skip_undo, SP_VERB_SELECTION_SYMDIFF, _("Exclusion"));
+ BoolOpErrors result = pathBoolOp(bool_op_symdiff, skip_undo, false, SP_VERB_SELECTION_SYMDIFF, _("Exclusion"));
return DONE == result;
}
bool
Inkscape::ObjectSet::pathCut(const bool skip_undo)
{
- BoolOpErrors result = pathBoolOp(bool_op_cut, skip_undo, SP_VERB_SELECTION_CUT, _("Division"));
+ BoolOpErrors result = pathBoolOp(bool_op_cut, skip_undo, false, SP_VERB_SELECTION_CUT, _("Division"));
return DONE == result;
}
bool
Inkscape::ObjectSet::pathSlice(const bool skip_undo)
{
- BoolOpErrors result = pathBoolOp(bool_op_slice, skip_undo, SP_VERB_SELECTION_SLICE, _("Cut path"));
+ BoolOpErrors result = pathBoolOp(bool_op_slice, skip_undo, false, SP_VERB_SELECTION_SLICE, _("Cut path"));
return DONE == result;
}
@@ -308,11 +308,11 @@ Geom::PathVector pathliv_to_pathvector(Path *pathliv){
// boolean operations on the desktop
// take the source paths from the file, do the operation, delete the originals and add the results
-BoolOpErrors Inkscape::ObjectSet::pathBoolOp(bool_op bop, const bool skip_undo, const unsigned int verb, const Glib::ustring description)
+BoolOpErrors Inkscape::ObjectSet::pathBoolOp(bool_op bop, const bool skip_undo, const bool checked, const unsigned int verb, const Glib::ustring description)
{
- if (nullptr != desktop() && !skip_undo) {
+ if (nullptr != desktop() && !checked) {
SPDocument *doc = desktop()->getDocument();
- BoolOpErrors returnCode = ObjectSet::pathBoolOp(bop, true);
+ BoolOpErrors returnCode = ObjectSet::pathBoolOp(bop, true, true);
switch(returnCode) {
case ERR_TOO_LESS_PATHS_1:
boolop_display_error_message(desktop(), _("Select <b>at least 1 path</b> to perform a boolean union."));
@@ -327,10 +327,14 @@ BoolOpErrors Inkscape::ObjectSet::pathBoolOp(bool_op bop, const bool skip_undo,
boolop_display_error_message(desktop(), _("Unable to determine the <b>z-order</b> of the objects selected for difference, XOR, division, or path cut."));
break;
case DONE_NO_PATH:
- DocumentUndo::done(doc, SP_VERB_NONE, description);
+ if (!skip_undo) {
+ DocumentUndo::done(doc, SP_VERB_NONE, description);
+ }
break;
case DONE:
- DocumentUndo::done(doc, verb, description);
+ if (!skip_undo) {
+ DocumentUndo::done(doc, verb, description);
+ }
break;
}
return returnCode;