fix bug with adding new widget to event frame outside of a paint event

This commit is contained in:
garak
2020-01-02 14:59:31 -05:00
committed by garakmon
parent b5adbe782d
commit ccccb7cec0
4 changed files with 28 additions and 17 deletions

View File

@@ -1,6 +1,8 @@
#ifndef EVENTPROPERTIESFRAME_H
#define EVENTPROPERTIESFRAME_H
#include "event.h"
#include <QFrame>
namespace Ui {
@@ -12,11 +14,16 @@ class EventPropertiesFrame : public QFrame
Q_OBJECT
public:
explicit EventPropertiesFrame(QWidget *parent = nullptr);
explicit EventPropertiesFrame(Event *event, QWidget *parent = nullptr);
~EventPropertiesFrame();
void paintEvent(QPaintEvent*);
public:
Ui::EventPropertiesFrame *ui;
private:
Event *event;
bool firstShow = true;
};
#endif // EVENTPROPERTIESFRAME_H

View File

@@ -51,8 +51,6 @@ private:
void paintSmartPath(int x, int y);
static QList<int> smartPathTable;
void paint_object(QGraphicsSceneMouseEvent*);// ?
signals:
void startPaint(QGraphicsSceneMouseEvent *, MapPixmapItem *);
void endPaint(QGraphicsSceneMouseEvent *, MapPixmapItem *);