mirror of
https://github.com/leozide/leocad
synced 2024-12-26 21:58:44 +01:00
Added preview indicator for synth parts.
This commit is contained in:
parent
e6e1ee70a6
commit
e9040c8332
3 changed files with 9 additions and 0 deletions
|
@ -436,6 +436,14 @@ void lcPartSelectionListModel::DrawPreview(int InfoIndex)
|
||||||
|
|
||||||
QImage Image = mView->GetRenderFramebufferImage().convertToFormat(QImage::Format_ARGB32);
|
QImage Image = mView->GetRenderFramebufferImage().convertToFormat(QImage::Format_ARGB32);
|
||||||
|
|
||||||
|
if (Info->GetSynthInfo())
|
||||||
|
{
|
||||||
|
QPainter Painter(&Image);
|
||||||
|
QImage Icon = QImage(":/resources/flexible.png");
|
||||||
|
Painter.drawImage(QPoint(0, 0), Icon);
|
||||||
|
Painter.end();
|
||||||
|
}
|
||||||
|
|
||||||
mParts[InfoIndex].second = QPixmap::fromImage(Image).scaled(mIconSize, mIconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
mParts[InfoIndex].second = QPixmap::fromImage(Image).scaled(mIconSize, mIconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||||
|
|
||||||
lcGetPiecesLibrary()->ReleasePieceInfo(Info);
|
lcGetPiecesLibrary()->ReleasePieceInfo(Info);
|
||||||
|
|
|
@ -135,5 +135,6 @@
|
||||||
<file>resources/shaders/unlit_view_sphere_ps.glsl</file>
|
<file>resources/shaders/unlit_view_sphere_ps.glsl</file>
|
||||||
<file>resources/shaders/unlit_view_sphere_vs.glsl</file>
|
<file>resources/shaders/unlit_view_sphere_vs.glsl</file>
|
||||||
<file>resources/gear_in.png</file>
|
<file>resources/gear_in.png</file>
|
||||||
|
<file>resources/flexible.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
BIN
resources/flexible.png
Normal file
BIN
resources/flexible.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 444 B |
Loading…
Reference in a new issue