From b02dc5e62217a149af62d3787f4bb8a73b369617 Mon Sep 17 00:00:00 2001 From: Tats Date: Mon, 23 Jun 2014 16:20:52 -0400 Subject: [PATCH] Bug fix: in Qt5 the layoutChanged() did not work anymore for the layer reordering --- MainWindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MainWindow.cpp b/MainWindow.cpp index d10d3dd..091b2e6 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -1539,7 +1539,10 @@ void MainWindow::connectProjectWidgets() connect(mappingList, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(handleItemSelected(QListWidgetItem*))); - connect(mappingList->model(), SIGNAL(layoutChanged()), + connect(mappingList, SIGNAL(indexesMoved(const QModelIndexList&)), + this, SLOT(handleMappingIndexesMoved())); + + connect(mappingList->model(), SIGNAL(rowsMoved(const QModelIndex&, int, int, const QModelIndex &, int)), this, SLOT(handleMappingIndexesMoved())); } @@ -1566,7 +1569,7 @@ void MainWindow::disconnectProjectWidgets() disconnect(mappingList, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(handleItemSelected(QListWidgetItem*))); - disconnect(mappingList->model(), SIGNAL(layoutChanged()), + disconnect(mappingList->model(), SIGNAL(rowsMoved(const QModelIndex&, int, int, const QModelIndex &, int)), this, SLOT(handleMappingIndexesMoved())); }