whoops, fix some ifdefs and things
This commit is contained in:
parent
909b3c5665
commit
80c38380d1
1 changed files with 5 additions and 7 deletions
|
@ -20,7 +20,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: XLayer.cc,v 1.7 2003/04/15 23:09:24 rathnor Exp $
|
// $Id: XLayer.cc,v 1.8 2003/04/15 23:20:31 rathnor Exp $
|
||||||
|
|
||||||
#include "XLayer.hh"
|
#include "XLayer.hh"
|
||||||
#include "XLayerItem.hh"
|
#include "XLayerItem.hh"
|
||||||
|
@ -252,12 +252,12 @@ void XLayer::raise(XLayerItem &item) {
|
||||||
iterator it = std::find(itemList().begin(), itemList().end(), &item);
|
iterator it = std::find(itemList().begin(), itemList().end(), &item);
|
||||||
if (it != itemList().end())
|
if (it != itemList().end())
|
||||||
itemList().erase(it);
|
itemList().erase(it);
|
||||||
#ifdef DEBUG
|
|
||||||
else {
|
else {
|
||||||
|
#ifdef DEBUG
|
||||||
cerr<<__FILE__<<"("<<__LINE__<<"): WARNING: raise on item not in layer["<<m_layernum<<"]"<<endl;
|
cerr<<__FILE__<<"("<<__LINE__<<"): WARNING: raise on item not in layer["<<m_layernum<<"]"<<endl;
|
||||||
|
#endif // DEBUG
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif // DEBUG
|
|
||||||
|
|
||||||
itemList().push_front(&item);
|
itemList().push_front(&item);
|
||||||
stackBelowItem(&item, m_manager.getLowestItemAboveLayer(m_layernum));
|
stackBelowItem(&item, m_manager.getLowestItemAboveLayer(m_layernum));
|
||||||
|
@ -271,14 +271,12 @@ void XLayer::tempRaise(XLayerItem &item) {
|
||||||
return; // nothing to do
|
return; // nothing to do
|
||||||
|
|
||||||
iterator it = std::find(itemList().begin(), itemList().end(), &item);
|
iterator it = std::find(itemList().begin(), itemList().end(), &item);
|
||||||
if (it != itemList().end())
|
if (it == itemList().end()) {
|
||||||
// don't remove it
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
else {
|
|
||||||
cerr<<__FILE__<<"("<<__LINE__<<"): WARNING: raise on item not in layer["<<m_layernum<<"]"<<endl;
|
cerr<<__FILE__<<"("<<__LINE__<<"): WARNING: raise on item not in layer["<<m_layernum<<"]"<<endl;
|
||||||
|
#endif // DEBUG
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif // DEBUG
|
|
||||||
|
|
||||||
// don't add it back to the top
|
// don't add it back to the top
|
||||||
stackBelowItem(&item, m_manager.getLowestItemAboveLayer(m_layernum));
|
stackBelowItem(&item, m_manager.getLowestItemAboveLayer(m_layernum));
|
||||||
|
|
Loading…
Reference in a new issue