From b4c411311ec8f39ab0ed3979ab70585bc6ee934e Mon Sep 17 00:00:00 2001 From: T1ti <40864460+T1ti@users.noreply.github.com> Date: Thu, 18 Jul 2024 19:24:40 +0200 Subject: [PATCH] attempt at fixing some opengl context bugs when deleting models --- src/noggit/MapView.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/noggit/MapView.cpp b/src/noggit/MapView.cpp index f9b261d8..2e6dd152 100755 --- a/src/noggit/MapView.cpp +++ b/src/noggit/MapView.cpp @@ -6209,6 +6209,9 @@ void MapView::ShowContextMenu(QPoint pos) action_replace.setToolTip("Replace the currently selected objects by the object in the clipboard (There must only be one!). M2s can only be replaced by m2s"); QObject::connect(&action_replace, &QAction::triggered, [=]() { + makeCurrent(); + OpenGL::context::scoped_setter const _(::gl, context()); + if (terrainMode != editing_mode::object && NOGGIT_CUR_ACTION) return;