doc: Remove SpritesObserver

This commit is contained in:
David Capello 2018-04-18 16:56:02 -03:00
parent 44a920b444
commit 4873d8d799
3 changed files with 3 additions and 31 deletions

View File

@ -1,5 +1,5 @@
// Aseprite Document Library
// Copyright (c) 2001-2016 David Capello
// Copyright (c) 2001-2018 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@ -10,7 +10,6 @@
#include "doc/sprites.h"
#include "base/mutex.h"
#include "base/unique_ptr.h"
#include "doc/sprite.h"
#include "doc/cel.h"
@ -51,7 +50,6 @@ Sprite* Sprites::add(Sprite* spr)
m_sprites.insert(begin(), spr);
spr->setDocument(m_doc);
notify_observers(&SpritesObserver::onAddSprite, spr);
return spr;
}

View File

@ -1,5 +1,5 @@
// Aseprite Document Library
// Copyright (c) 2001-2016 David Capello
// Copyright (c) 2001-2018 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@ -12,15 +12,13 @@
#include "doc/color_mode.h"
#include "doc/object_id.h"
#include "doc/sprite.h"
#include "doc/sprites_observer.h"
#include "obs/observable.h"
#include <vector>
namespace doc {
class Document;
class Sprites : obs::observable<SpritesObserver> {
class Sprites {
public:
typedef std::vector<Sprite*>::iterator iterator;
typedef std::vector<Sprite*>::const_iterator const_iterator;

View File

@ -1,24 +0,0 @@
// Aseprite Document Library
// Copyright (c) 2001-2014 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef DOC_SPRITES_OBSERVER_H_INCLUDED
#define DOC_SPRITES_OBSERVER_H_INCLUDED
#pragma once
#include "doc/sprite.h"
namespace doc {
class SpritesObserver {
public:
virtual ~SpritesObserver() { }
virtual void onAddSprite(Sprite* spr) { }
virtual void onRemoveSprite(Sprite* spr) { }
};
} // namespace doc
#endif