2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Moved position info from ItemBases to AbstractLayoutItem.

This commit is contained in:
23rd
2021-07-26 01:37:06 +03:00
parent 2256482ae0
commit c82006c6f8
7 changed files with 15 additions and 25 deletions

View File

@@ -120,7 +120,7 @@ void Gif::initDimensions() {
}
void Gif::setPosition(int32 position) {
ItemBase::setPosition(position);
AbstractLayoutItem::setPosition(position);
if (_position < 0) {
_gif.reset();
}
@@ -1358,7 +1358,7 @@ void Game::initDimensions() {
}
void Game::setPosition(int32 position) {
ItemBase::setPosition(position);
AbstractLayoutItem::setPosition(position);
if (_position < 0) {
_gif.reset();
}

View File

@@ -28,14 +28,6 @@ NeverFreedPointer<DocumentItems> documentItemsMap;
} // namespace
void ItemBase::setPosition(int32 position) {
_position = position;
}
int32 ItemBase::position() const {
return _position;
}
Result *ItemBase::getResult() const {
return _result;
}

View File

@@ -77,9 +77,6 @@ public:
virtual void paint(Painter &p, const QRect &clip, const PaintContext *context) const = 0;
virtual void setPosition(int32 position);
int32 position() const;
virtual bool isFullLine() const {
return true;
}
@@ -144,8 +141,6 @@ protected:
ClickHandlerPtr _send = ClickHandlerPtr{ new SendClickHandler() };
ClickHandlerPtr _open = ClickHandlerPtr{ new OpenFileClickHandler() };
int _position = 0; // < 0 means removed from layout
private:
not_null<Context*> _context;
mutable std::shared_ptr<Data::CloudImageView> _thumbnail;