Skip to content

Commit

Permalink
Merge pull request #56 from GravisZro/memory-fix
Browse files Browse the repository at this point in the history
Serious memory bug fix.
  • Loading branch information
sebcaux authored Sep 17, 2023
2 parents a30fc69 + bf11b84 commit b2b2306
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/kicad/itemmodel/componentlibtreeview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,12 @@ Lib *ComponentLibTreeView::lib() const

void ComponentLibTreeView::setLib(Lib *lib)
{
_model->setLib(lib);
if (lib == _model->lib())
if (lib != _model->lib())
{
return;
_model->setLib(lib);
resizeColumnToContents(0);
resizeColumnToContents(1);
}
resizeColumnToContents(0);
resizeColumnToContents(1);
}

void ComponentLibTreeView::setActiveComponent(Component *component)
Expand Down

0 comments on commit b2b2306

Please sign in to comment.