Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/actions/KisPasteActionFactory.cpp
Context not available. | |||||
18 | 18 | | |||
---|---|---|---|---|---|
19 | #include "KisPasteActionFactory.h" | 19 | #include "KisPasteActionFactory.h" | ||
20 | 20 | | |||
21 | #include <QApplication> | ||||
22 | | ||||
23 | #include "kis_config.h" | ||||
21 | #include "kis_image.h" | 24 | #include "kis_image.h" | ||
22 | #include "KisViewManager.h" | 25 | #include "KisViewManager.h" | ||
23 | #include "kis_tool_proxy.h" | 26 | #include "kis_tool_proxy.h" | ||
Context not available. | |||||
28 | #include "kis_shape_layer.h" | 31 | #include "kis_shape_layer.h" | ||
29 | #include "kis_import_catcher.h" | 32 | #include "kis_import_catcher.h" | ||
30 | #include "kis_clipboard.h" | 33 | #include "kis_clipboard.h" | ||
34 | #include "kis_selection.h" | ||||
35 | #include "commands/kis_selection_commands.h" | ||||
31 | #include "commands/kis_image_layer_add_command.h" | 36 | #include "commands/kis_image_layer_add_command.h" | ||
37 | #include "KisTransformToolActivationCommand.h" | ||||
32 | #include "kis_processing_applicator.h" | 38 | #include "kis_processing_applicator.h" | ||
33 | 39 | | |||
34 | #include <KoSvgPaste.h> | 40 | #include <KoSvgPaste.h> | ||
Context not available. | |||||
237 | KUndo2Command *cmd = new KisImageLayerAddCommand(image, newLayer, parentNode, aboveNode); | 243 | KUndo2Command *cmd = new KisImageLayerAddCommand(image, newLayer, parentNode, aboveNode); | ||
238 | KisProcessingApplicator *ap = beginAction(view, cmd->text()); | 244 | KisProcessingApplicator *ap = beginAction(view, cmd->text()); | ||
239 | ap->applyCommand(cmd, KisStrokeJobData::SEQUENTIAL, KisStrokeJobData::NORMAL); | 245 | ap->applyCommand(cmd, KisStrokeJobData::SEQUENTIAL, KisStrokeJobData::NORMAL); | ||
246 | | ||||
247 | if (KisConfig(true).activateTransformToolAfterPaste()) { | ||||
248 | KUndo2Command *deselectCmd = new KisDeselectActiveSelectionCommand(view->selection(), image); | ||||
249 | ap->applyCommand(deselectCmd, KisStrokeJobData::SEQUENTIAL, KisStrokeJobData::NORMAL); | ||||
250 | | ||||
251 | KUndo2Command *transformToolCmd = new KisTransformToolActivationCommand(view); | ||||
252 | ap->applyCommand(transformToolCmd, KisStrokeJobData::BARRIER, KisStrokeJobData::NORMAL); | ||||
253 | } | ||||
254 | | ||||
240 | endAction(ap, KisOperationConfiguration(id()).toXML()); | 255 | endAction(ap, KisOperationConfiguration(id()).toXML()); | ||
241 | } else { | 256 | } else { | ||
242 | // XXX: "Add saving of XML data for Paste of shapes" | 257 | // XXX: "Add saving of XML data for Paste of shapes" | ||
Context not available. |