From 2fba80777777aa12ac91a601610d24d218bd9e59 Mon Sep 17 00:00:00 2001 From: Person Date: Sat, 4 Mar 2017 07:46:28 -0800 Subject: [PATCH] --Bug fixes: -Query matrices when drawing affines even if they are set not to be drawn because the values are used elsewhere. -No longer need to move library items on a delayed timer when dragging and dropping. --- Source/Fractorium/GLWidget.cpp | 3 ++- Source/Fractorium/LibraryTreeWidget.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Fractorium/GLWidget.cpp b/Source/Fractorium/GLWidget.cpp index eb546f4..742d762 100644 --- a/Source/Fractorium/GLWidget.cpp +++ b/Source/Fractorium/GLWidget.cpp @@ -286,10 +286,11 @@ void GLEmberController::DrawImage() template void GLEmberController::DrawAffines(bool pre, bool post) { + QueryVMP();//Resolves to float or double specialization function depending on T. + if (!m_Fractorium->DrawXforms() || (m_DragState == eDragState::DragRotateScale)) return; - QueryVMP();//Resolves to float or double specialization function depending on T. auto ember = m_FractoriumEmberController->CurrentEmber(); bool dragging = m_DragState == eDragState::DragDragging; diff --git a/Source/Fractorium/LibraryTreeWidget.cpp b/Source/Fractorium/LibraryTreeWidget.cpp index af18cb0..b0f81de 100644 --- a/Source/Fractorium/LibraryTreeWidget.cpp +++ b/Source/Fractorium/LibraryTreeWidget.cpp @@ -72,7 +72,7 @@ void LibraryTreeWidget::dropEvent(QDropEvent* de) auto itemrow = offsetitem.row();//Will be at least 1 if dropped above it. auto offset = itemrow; - for (i = 0; i < dragItems.size(); i++) + for (i = 0; i < dragItems.size() && offset > 0; i++) { offset--; @@ -91,6 +91,6 @@ void LibraryTreeWidget::dropEvent(QDropEvent* de) } } - QTimer::singleShot(500, [ = ]() { m_Fractorium->m_Controller->MoveLibraryItems(items, row); });//Need to fire this after this event has internally reshuffled the items. + m_Fractorium->m_Controller->MoveLibraryItems(items, row); } } \ No newline at end of file