diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2018-10-26 17:53:07 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2018-10-26 17:53:07 +0200 |
commit | 455e90b12354953bc19e4e73825433df3cf8fe2d (patch) | |
tree | d7d9d0e765e927cafd4745dfab9367494acdd434 /gui | |
parent | 757dcd2a5277ef65d9ce4ff7b118e6072edbb71a (diff) | |
download | nextpnr-455e90b12354953bc19e4e73825433df3cf8fe2d.tar.gz nextpnr-455e90b12354953bc19e4e73825433df3cf8fe2d.tar.bz2 nextpnr-455e90b12354953bc19e4e73825433df3cf8fe2d.zip |
No gain in optimizing this, but lead to wrong display
Diffstat (limited to 'gui')
-rw-r--r-- | gui/fpgaviewwidget.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gui/fpgaviewwidget.cc b/gui/fpgaviewwidget.cc index a6552ec9..93a2dc77 100644 --- a/gui/fpgaviewwidget.cc +++ b/gui/fpgaviewwidget.cc @@ -545,8 +545,7 @@ void FPGAViewWidget::renderLines(void) // Whether the currently being hovered decal is also selected. bool hoveringSelected = false; - // Render selected. - int prev = rendererData_->gfxSelected.indices.size(); + // Render selected. rendererData_->bbSelected.clear(); rendererData_->gfxSelected.clear(); for (auto &decal : selectedDecals) { @@ -554,27 +553,22 @@ void FPGAViewWidget::renderLines(void) hoveringSelected = true; renderDecal(rendererData_->gfxSelected, rendererData_->bbSelected, decal); } - int curr = rendererData_->gfxSelected.indices.size(); - if (curr!=prev) rendererData_->gfxSelected.last_render++; + rendererData_->gfxSelected.last_render++; // Render hovered. - prev = rendererData_->gfxHovered.indices.size(); rendererData_->gfxHovered.clear(); if (!hoveringSelected) { renderDecal(rendererData_->gfxHovered, rendererData_->bbGlobal, hoveredDecal); } - curr = rendererData_->gfxHovered.indices.size(); - if (curr!=prev) rendererData_->gfxHovered.last_render++; + rendererData_->gfxHovered.last_render++; // Render highlighted. for (int i = 0; i < 8; i++) { - prev = rendererData_->gfxHighlighted[i].indices.size(); rendererData_->gfxHighlighted[i].clear(); for (auto &decal : highlightedDecals[i]) { renderDecal(rendererData_->gfxHighlighted[i], rendererData_->bbGlobal, decal); } - curr = rendererData_->gfxHighlighted[i].indices.size(); - if (curr!=prev) rendererData_->gfxHighlighted[i].last_render++; + rendererData_->gfxHighlighted[i].last_render++; } } |