Brw, changing undo stack size won'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"><></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("undoEnabled", undo);<br>
}<br>
<br>
+int KisConfig::undoStackLimit() const<br>
+{<br>
+ return m_cfg.readEntry("undoStackLimit", 100);<br>
+}<br>
+<br>
+void KisConfig::setUndoStackLimit(int limit)<br>
+{<br>
+ m_cfg.writeEntry("undoStackLimit", limit);<br>
+}<br>
+<br>
qint32 KisConfig::defImageWidth() const<br>
{<br>
return m_cfg.readEntry("imageWidthDef", 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("krita_template");<br>
init();<br>
connect(this, SIGNAL(sigLoadingFinished()), this, SLOT(slotLoadingFinished()));<br>
+ undoStack()->setUndoLimit(KisConfig().undoStackLimit());<br>
}<br>
<br>
KisDoc2::~KisDoc2()<br>
</blockquote></div><br><br clear="all"><br>-- <br>Dmitry Kazakov<br>