[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: koffice/krita/ui
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2010-03-05 18:06:28
Message-ID: ae32c1ef1003051006j15938d47p405778bbe30f7a01 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

Brw, changing undo stack size won&#39;t change memory consumption of the memento \
manager.<br><br><div class="gmail_quote">On Mon, Mar 1, 2010 at 4:35 PM, Cyrille \
Berger <span dir="ltr">&lt;&gt;</span> wrote:<br><blockquote class="gmail_quote" \
style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); \
padding-left: 1ex;"> SVN commit 1097482 by berger:<br>
<br>
make the size of the undo stack configurable<br>
<br>
<br>
  M   +10 -0       kis_config.cc<br>
  M   +3 -0         kis_config.h<br>
  M   +1 -0         kis_doc2.cc<br>
<br>
<br>
--- trunk/koffice/krita/ui/kis_config.cc #1097481:1097482<br>
@@ -73,6 +73,16 @@<br>
       m_cfg.writeEntry(&quot;undoEnabled&quot;, undo);<br>
  }<br>
<br>
+int KisConfig::undoStackLimit() const<br>
+{<br>
+      return m_cfg.readEntry(&quot;undoStackLimit&quot;, 100);<br>
+}<br>
+<br>
+void KisConfig::setUndoStackLimit(int limit)<br>
+{<br>
+      m_cfg.writeEntry(&quot;undoStackLimit&quot;, limit);<br>
+}<br>
+<br>
  qint32 KisConfig::defImageWidth() const<br>
  {<br>
       return m_cfg.readEntry(&quot;imageWidthDef&quot;, IMAGE_DEFAULT_WIDTH);<br>
--- trunk/koffice/krita/ui/kis_config.h #1097481:1097482<br>
@@ -38,6 +38,9 @@<br>
<br>
       bool undoEnabled() const;<br>
       void setUndoEnabled(bool undo);<br>
+<br>
+      int undoStackLimit() const;<br>
+      void setUndoStackLimit(int limit);<br>
<br>
       qint32 defImageWidth() const;<br>
       void defImageWidth(qint32 width);<br>
--- trunk/koffice/krita/ui/kis_doc2.cc #1097481:1097482<br>
@@ -150,6 +150,7 @@<br>
       setTemplateType(&quot;krita_template&quot;);<br>
       init();<br>
       connect(this, SIGNAL(sigLoadingFinished()), this, \
SLOT(slotLoadingFinished()));<br> +      \
undoStack()-&gt;setUndoLimit(KisConfig().undoStackLimit());<br>  }<br>
<br>
  KisDoc2::~KisDoc2()<br>
</blockquote></div><br><br clear="all"><br>-- <br>Dmitry Kazakov<br>



_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic