From 4754ec384f33de1e05890188ac8c8e550cafbf3f Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 20 Feb 2020 02:20:16 +1100 Subject: [PATCH] taskview: actually corrected taskviewitem order An earlier commit addressed faulty TaskViewItem ordering by changing insertWidget to addWidget. Turns out this was the wrong strategy since the insert was used to get widgets above the stretch. The correct strategy is using insert(count()-1) instead of insert(0) --- app/widget/taskview/taskview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/widget/taskview/taskview.cpp b/app/widget/taskview/taskview.cpp index 37e147bd1..0869097a7 100644 --- a/app/widget/taskview/taskview.cpp +++ b/app/widget/taskview/taskview.cpp @@ -44,5 +44,5 @@ TaskView::TaskView(QWidget* parent) : void TaskView::AddTask(Task *t) { // Create TaskViewItem (UI representation of a Task) and connect it - layout_->addWidget(new TaskViewItem(t)); + layout_->insertWidget(layout_->count()-1, new TaskViewItem(t)); }