[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: koffice/krita/core/tiles
From: "Casper Boemann" <cbr () boemann ! dk>
Date: 2006-03-18 13:46:17
Message-ID: 026301c64a92$54eb1150$0401a8c0 () FK13045
[Download RAW message or body]
Great thanks
best regards
Casper
----- Original Message -----
From: "Adrian Page" <adrian@pagenet.plus.com>
To: <kde-commits@kde.org>
Sent: Saturday, March 18, 2006 1:32 PM
Subject: koffice/krita/core/tiles
> SVN commit 519950 by page:
>
> Tiles that exist at the start of a transaction and are then deleted and
> recreated should not be deleted on undo. This fixes the transform tool
> undo.
>
>
> M +15 -0 kis_memento.cc
> M +2 -0 kis_memento.h
> M +1 -1 kis_tileddatamanager.cc
>
>
> --- trunk/koffice/krita/core/tiles/kis_memento.cc #519949:519950
> @@ -136,4 +136,19 @@
> return QRect(x, y, w, h);
> }
>
> +bool KisMemento::containsTile(Q_INT32 col, Q_INT32 row, Q_UINT32
> tileHash) const
> +{
> + const KisTile *tile = m_hashTable[tileHash];
>
> + while (tile != 0)
> + {
> + if (tile->getRow() == row && tile->getCol() == col) {
> + return true;
> + }
> +
> + tile = tile->getNext();
> + }
> +
> + return false;
> +}
> +
> --- trunk/koffice/krita/core/tiles/kis_memento.h #519949:519950
> @@ -45,6 +45,8 @@
> void extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const;
> QRect extent() const;
>
> + bool containsTile(Q_INT32 col, Q_INT32 row, Q_UINT32 tileHash) const;
> +
> // For debugging use
> bool valid() const { return m_valid; }
> void setInvalid() { m_valid = false; }
> --- trunk/koffice/krita/core/tiles/kis_tileddatamanager.cc #519949:519950
> @@ -782,7 +782,7 @@
> m_numTiles++;
> updateExtent(col, row);
>
> - if (m_currentMemento) {
> + if (m_currentMemento && !m_currentMemento->containsTile(col,
> row, tileHash)) {
> m_currentMemento->addTileToDeleteOnUndo(col, row);
> }
> }
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic