Fixed preview toolbar not updating. Fixes #895.

This commit is contained in:
Leonardo Zide 2024-01-05 18:50:16 -08:00
parent c84a730ce4
commit 2aa388edad

View file

@ -2015,6 +2015,15 @@ void lcMainWindow::UpdateSelectedObjects(bool SelectionChanged)
mPropertiesWidget->Update(Selection, Focus);
if (Focus && Focus->IsPiece())
{
lcPiece* Piece = (lcPiece*)Focus;
int ColorIndex = Piece->GetColorIndex();
quint32 ColorCode = lcGetColorCode(ColorIndex);
PreviewPiece(Piece->mPieceInfo->mFileName, ColorCode, false);
}
QString Message;
if ((Selection.GetSize() == 1) && Focus)