koffice/krita/ui

Dmitry Kazakov dimula73 at gmail.com
Fri Mar 5 19:06:28 CET 2010


Brw, changing undo stack size won't change memory consumption of the memento
manager.

On Mon, Mar 1, 2010 at 4:35 PM, Cyrille Berger <> wrote:

> SVN commit 1097482 by berger:
>
> make the size of the undo stack configurable
>
>
>  M  +10 -0     kis_config.cc
>  M  +3 -0      kis_config.h
>  M  +1 -0      kis_doc2.cc
>
>
> --- trunk/koffice/krita/ui/kis_config.cc #1097481:1097482
> @@ -73,6 +73,16 @@
>     m_cfg.writeEntry("undoEnabled", undo);
>  }
>
> +int KisConfig::undoStackLimit() const
> +{
> +    return m_cfg.readEntry("undoStackLimit", 100);
> +}
> +
> +void KisConfig::setUndoStackLimit(int limit)
> +{
> +    m_cfg.writeEntry("undoStackLimit", limit);
> +}
> +
>  qint32 KisConfig::defImageWidth() const
>  {
>     return m_cfg.readEntry("imageWidthDef", IMAGE_DEFAULT_WIDTH);
> --- trunk/koffice/krita/ui/kis_config.h #1097481:1097482
> @@ -38,6 +38,9 @@
>
>     bool undoEnabled() const;
>     void setUndoEnabled(bool undo);
> +
> +    int undoStackLimit() const;
> +    void setUndoStackLimit(int limit);
>
>     qint32 defImageWidth() const;
>     void defImageWidth(qint32 width);
> --- trunk/koffice/krita/ui/kis_doc2.cc #1097481:1097482
> @@ -150,6 +150,7 @@
>     setTemplateType("krita_template");
>     init();
>     connect(this, SIGNAL(sigLoadingFinished()), this,
> SLOT(slotLoadingFinished()));
> +    undoStack()->setUndoLimit(KisConfig().undoStackLimit());
>  }
>
>  KisDoc2::~KisDoc2()
>



-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20100305/090beb8f/attachment.htm 


More information about the kimageshop mailing list