From 2aa388edad2c962a7e7d615e2bcf84a6085cea11 Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Fri, 5 Jan 2024 18:50:16 -0800 Subject: [PATCH] Fixed preview toolbar not updating. Fixes #895. --- common/lc_mainwindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/lc_mainwindow.cpp b/common/lc_mainwindow.cpp index 09332692..b76ff3ab 100644 --- a/common/lc_mainwindow.cpp +++ b/common/lc_mainwindow.cpp @@ -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)