mirror of
https://github.com/huderlem/porymap.git
synced 2026-10-01 12:26:37 -05:00
Fix status not updating while painting on map, remove redundant CollisionPixmapItem handling
This commit is contained in:
@@ -30,23 +30,7 @@ public:
|
||||
void draw(bool ignoreCache = false) override;
|
||||
|
||||
private:
|
||||
unsigned actionId_ = 0;
|
||||
QPoint previousPos;
|
||||
void updateSelection(QPoint pos);
|
||||
|
||||
signals:
|
||||
void mouseEvent(QGraphicsSceneMouseEvent *, CollisionPixmapItem *);
|
||||
void hoverEntered(const QPoint &pos);
|
||||
void hoverChanged(const QPoint &pos);
|
||||
void hoverCleared();
|
||||
|
||||
protected:
|
||||
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent*) override;
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent*) override;
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent*) override;
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent*) override;
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent*) override;
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent*) override;
|
||||
};
|
||||
|
||||
#endif // COLLISIONPIXMAPITEM_H
|
||||
|
||||
@@ -88,6 +88,9 @@ public:
|
||||
void lockNondominantAxis(QGraphicsSceneMouseEvent *event);
|
||||
QPoint adjustCoords(QPoint pos);
|
||||
|
||||
protected:
|
||||
unsigned actionId_ = 0;
|
||||
|
||||
private:
|
||||
void paintSmartPath(int x, int y, bool fromScriptCall = false);
|
||||
static bool isValidSmartPathSelection(MetatileSelection selection);
|
||||
@@ -97,8 +100,6 @@ private:
|
||||
static constexpr int smartPathMiddleIndex = (smartPathWidth / 2) + ((smartPathHeight / 2) * smartPathWidth);
|
||||
QPoint lastMetatileSelectionPos = QPoint(-1,-1);
|
||||
|
||||
unsigned actionId_ = 0;
|
||||
|
||||
signals:
|
||||
void startPaint(QGraphicsSceneMouseEvent *, LayoutPixmapItem *);
|
||||
void endPaint(QGraphicsSceneMouseEvent *, LayoutPixmapItem *);
|
||||
|
||||
Reference in New Issue
Block a user