Revision 0144a72...
Go back to digest for 31st July 2011Other in Office
A huge patch
There are two changes:
1) See: http://community.kde.org/Krita/Undo_adapter_vs_Undo_store
Split the functionality of KisUndoAdapter into two classes:
KisUndoStore and KisUndoAdapter. The former one works as an
interface to an external storage of the undo information:
undo stack, KoDocument, /dev/null. The latter one defines the
behavior of the system when someone wants to add a command. There
are three variants:
1) KisSurrogateUndoAdapter -- saves commands directly to the
internal stack. Used for wrapping around legacy code into
a single command.
2) KisLegacyUndoAdapter -- blocks the strokes and updates queue,
and then adds the command to a store
3) KisPostExecutionUndoAdapter -- used by the strokes. It doesn't
call redo() when you add a command. It is assumed, that you have
already executed the command yourself and now just notify
the system about it. Warning: it doesn't inherit KisUndoAdapter
because it doesn't fit the contract of this class. And, more
important, KisTransaction should work differently with this class.
2) The ownership on the KisUndoStore (that substituted KisUndoAdapter
in the document's code) now belongs to the image. It means that
KisDoc2::createUndoStore() is just a factory method, the document
doesn't store the undo store itself.
File Changes
- /image
- krita/kis_legacy_undo_adapter.cpp
- krita/kis_undo_stores.cpp
- krita/kis_undo_stores.h
- /image
- krita/kis_dumb_undo_adapter.cpp
- krita/kis_dumb_undo_adapter.h
- krita/kis_real_undo_adapter.cpp
- krita/kis_scheduled_undo_adapter.cpp
- krita/image/CMakeLists.txt
- krita/image/kis_image.cc
- krita/image/kis_image.h
- krita/image/kis_indirect_painting_support.cpp
- krita/image/kis_indirect_painting_support.h
- krita/image/kis_painter.cc
- krita/image/kis_painter.h
- krita/image/kis_stroke_strategy_undo_command_based.cpp
- krita/image/kis_stroke_strategy_undo_command_based.h
- krita/image/kis_surrogate_undo_adapter.cpp
- krita/image/kis_surrogate_undo_adapter.h
- krita/image/kis_transaction.h
- krita/image/kis_undo_adapter.cpp
- krita/image/kis_undo_adapter.h
- krita/ui/kis_doc2.cc
- krita/ui/kis_doc2.h
- krita/ui/kis_layer_manager.cc
- krita/ui/kis_png_converter.cpp
- krita/ui/kis_png_converter.h
- krita/ui/kis_selection_manager.cc
- krita/ui/kis_view2.cpp
- krita/image/tests/kis_colorspace_convert_visitor_test.cpp
- krita/image/tests/kis_crop_processing_visitor_test.cpp
- krita/image/tests/kis_crop_visitor_test.cpp
- krita/image/tests/kis_processing_applicator_test.cpp
- krita/ui/kra/kis_kra_loader.cpp
- krita/ui/openrastertk/kis_open_raster_stack_load_visitor.cpp
- krita/ui/tests/kis_doc2_test.cpp
- krita/ui/tests/stroke_testing_utils.cpp
- krita/ui/tests/stroke_testing_utils.h
- krita/ui/widgets/kis_scratch_pad.cpp
- krita/plugins/extensions/imagesplit/imagesplit.cpp
- krita/plugins/extensions/separate_channels/kis_channel_separator.cc
- krita/plugins/formats/bmp/kis_bmp_import.cpp
- krita/plugins/formats/exr/exr_converter.cc
- krita/plugins/formats/exr/exr_converter.h
- krita/plugins/formats/exr/exr_import.cc
- krita/plugins/formats/jp2/jp2_converter.cc
- krita/plugins/formats/jp2/jp2_converter.h
- krita/plugins/formats/jp2/jp2_import.cc
- krita/plugins/formats/jpeg/kis_jpeg_converter.cc
- krita/plugins/formats/jpeg/kis_jpeg_converter.h
- krita/plugins/formats/jpeg/kis_jpeg_export.cc
- krita/plugins/formats/jpeg/kis_jpeg_import.cc
- krita/plugins/formats/odg/kis_odg_import.cc
- krita/plugins/formats/ora/ora_converter.cc
- krita/plugins/formats/ora/ora_converter.h
- krita/plugins/formats/ora/ora_export.cc
- krita/plugins/formats/ora/ora_import.cc
- krita/plugins/formats/ora/ora_load_context.cc
- krita/plugins/formats/ora/ora_save_context.cc
- krita/plugins/formats/pdf/kis_pdf_import.cpp
- krita/plugins/formats/png/kis_png_export.cc
- krita/plugins/formats/png/kis_png_import.cc
- krita/plugins/formats/ppm/kis_ppm_import.cpp
- krita/plugins/formats/psd/psd_export.cc
- krita/plugins/formats/psd/psd_import.cc
- krita/plugins/formats/psd/psd_loader.cpp
- krita/plugins/formats/psd/psd_loader.h
- krita/plugins/formats/psd/psd_saver.cpp
- krita/plugins/formats/psd/psd_saver.h
- krita/plugins/formats/raw/kis_raw_import.cpp
- krita/plugins/formats/tiff/kis_tiff_converter.cc
- krita/plugins/formats/tiff/kis_tiff_converter.h
- krita/plugins/formats/tiff/kis_tiff_export.cc
- krita/plugins/formats/tiff/kis_tiff_import.cc
- krita/plugins/formats/xcf/kis_xcf_import.cpp
- krita/plugins/tools/defaulttools/kis_tool_multihand.cpp
- krita/sdk/templates/filefilter/APPNAMELC_converter.cc
- krita/sdk/templates/filefilter/APPNAMELC_converter.h
- krita/sdk/templates/filefilter/APPNAMELC_import.cc
- krita/ui/tool/strokes/kis_painter_based_stroke_strategy.cpp