Skip to content

Commit

Permalink
Fixed (hopefully) the minimap not showing in cell views sometimes.
Browse files Browse the repository at this point in the history
This bug started happening after updating to Qt 5.15.2.

There were "unable to set geometry on qwidgetwindow" errors in the console
issued in the setViewport() call in BaseGraphicsView::setUseOpenGL().

This fix seems to be adding "this" as parent to the QGLWidget constructor.

Turing "hardware accelerated rendering" on/off seems to break the minimap
sometimes.
  • Loading branch information
Tim Baker committed Apr 17, 2021
1 parent b2e1a29 commit 2045135
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/editor/basegraphicsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ void BaseGraphicsView::setUseOpenGL(bool useOpenGL)
QGLFormat format = QGLFormat::defaultFormat();
format.setDepth(false); // No need for a depth buffer
format.setSampleBuffers(true); // Enable anti-aliasing
newViewport = new QGLWidget(format);
newViewport = new QGLWidget(format, this);
newViewport->setMinimumSize(200, 200);
}
} else {
if (qobject_cast<QGLWidget*>(viewport()))
Expand Down Expand Up @@ -365,6 +366,8 @@ MiniMap::MiniMap(BaseGraphicsView *parent)
, mSmallerButton(new QToolButton(mButtons))
{
setFrameStyle(NoFrame);
setMinimumWidth(20);
setMinimumHeight(20);

// For the smaller/bigger buttons
setMouseTracking(true);
Expand Down

0 comments on commit 2045135

Please sign in to comment.