aboutsummaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorSergiusz Bazanski <q3k@q3k.org>2018-08-01 03:55:28 +0100
committerSergiusz Bazanski <q3k@q3k.org>2018-08-01 03:55:28 +0100
commit1f787c37a3f6d96f30c06f936674943cc5de7893 (patch)
treece0bd0611df36725758046ffda5f0aeceb3fdb5c /gui
parente423cceba81288ce1d9a8ed1ea2df2dd7660cf3f (diff)
downloadnextpnr-1f787c37a3f6d96f30c06f936674943cc5de7893.tar.gz
nextpnr-1f787c37a3f6d96f30c06f936674943cc5de7893.tar.bz2
nextpnr-1f787c37a3f6d96f30c06f936674943cc5de7893.zip
gui: fix zoom outbound not happening with fast startup time
Diffstat (limited to 'gui')
-rw-r--r--gui/fpgaviewwidget.cc16
-rw-r--r--gui/fpgaviewwidget.h2
2 files changed, 10 insertions, 8 deletions
diff --git a/gui/fpgaviewwidget.cc b/gui/fpgaviewwidget.cc
index ed25a187..66739b28 100644
--- a/gui/fpgaviewwidget.cc
+++ b/gui/fpgaviewwidget.cc
@@ -323,14 +323,18 @@ void FPGAViewWidget::paintGL()
flags = rendererData_->flags;
}
- {
- QMutexLocker locker(&rendererArgsLock_);
- rendererArgs_->flags.clear();
- }
-
// Check flags passed through pipeline.
if (flags.zoomOutbound) {
- zoomOutbound();
+ // If we're doing init zoomOutbound, make sure we're actually drawing
+ // something already.
+ if (rendererData_->gfxByStyle[GraphicElement::STYLE_FRAME].vertices.size() != 0) {
+ zoomOutbound();
+ flags.zoomOutbound = false;
+ {
+ QMutexLocker lock(&rendererArgsLock_);
+ rendererArgs_->flags.zoomOutbound = false;
+ }
+ }
}
}
diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h
index c35821d9..a40a0153 100644
--- a/gui/fpgaviewwidget.h
+++ b/gui/fpgaviewwidget.h
@@ -251,8 +251,6 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
zoomOutbound = other.zoomOutbound;
return *this;
}
-
- void clear() { zoomOutbound = false; }
};
struct RendererArgs