[Fix] Fixed the drag&drop crash.
This commit is contained in:
parent
68d4bb443f
commit
33f4a245a7
@ -6,6 +6,7 @@
|
|||||||
PDFPageWidget::PDFPageWidget(QWidget* parent) :
|
PDFPageWidget::PDFPageWidget(QWidget* parent) :
|
||||||
QFrame(parent) {
|
QFrame(parent) {
|
||||||
|
|
||||||
|
selected = false;
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
|
|
||||||
/* Resize widget. */
|
/* Resize widget. */
|
||||||
|
@ -46,7 +46,7 @@ private:
|
|||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
QPushButton* btn1, *btn2;
|
QPushButton* btn1, *btn2;
|
||||||
|
|
||||||
bool selected = false;
|
bool selected;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void pageClicked(QMouseEvent* event, QString path);
|
void pageClicked(QMouseEvent* event, QString path);
|
||||||
|
@ -76,6 +76,8 @@ void PDFTableWidget::droppedPage(QString pathFrom, QString pathTo) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Frontend operations here.. */
|
/* Frontend operations here.. */
|
||||||
|
if(pathFrom == pathTo)
|
||||||
|
return;
|
||||||
qDebug() << pathFrom;
|
qDebug() << pathFrom;
|
||||||
qDebug() << pathTo;
|
qDebug() << pathTo;
|
||||||
PDFPageWidget* childFrom = pageChilds[pathFrom];
|
PDFPageWidget* childFrom = pageChilds[pathFrom];
|
||||||
|
Loading…
Reference in New Issue
Block a user