Proper highlight/selected cleanup on context re-init

This commit is contained in:
Miodrag Milanovic 2018-07-23 17:10:06 +02:00
parent eeb6203c9d
commit 7fd45c0cdf
2 changed files with 4 additions and 0 deletions

View File

@ -229,6 +229,7 @@ void DesignWidget::addToHistory(QTreeWidgetItem *item)
void DesignWidget::newContext(Context *ctx)
{
highlightSelected.clear();
treeWidget->clear();
// reset pointers since they are not valid after clear
nets_root = nullptr;

View File

@ -289,6 +289,9 @@ FPGAViewWidget::~FPGAViewWidget() {}
void FPGAViewWidget::newContext(Context *ctx)
{
ctx_ = ctx;
onSelectedArchItem(std::vector<DecalXY>());
for (int i = 0; i < 8; i++)
onHighlightGroupChanged(std::vector<DecalXY>(), i);
pokeRenderer();
}