diff --git a/src/Editor/ModelEditor/CModelEditorWindow.cpp b/src/Editor/ModelEditor/CModelEditorWindow.cpp index 85882df2..197a2257 100644 --- a/src/Editor/ModelEditor/CModelEditorWindow.cpp +++ b/src/Editor/ModelEditor/CModelEditorWindow.cpp @@ -234,10 +234,10 @@ void CModelEditorWindow::SetActiveMaterial(int MatIndex) { QColor Color; CColor KColor = mpCurrentMat->Konst(iKonst); - Color.setRed(KColor.r); - Color.setGreen(KColor.g); - Color.setBlue(KColor.b); - Color.setAlpha(KColor.a); + Color.setRed(KColor.r * 255); + Color.setGreen(KColor.g * 255); + Color.setBlue(KColor.b * 255); + Color.setAlpha(KColor.a * 255); if (iKonst == 0) ui->KonstColorPickerA->setColor(Color); else if (iKonst == 1) ui->KonstColorPickerB->setColor(Color); diff --git a/src/Editor/Widgets/WPropertyEditor.cpp b/src/Editor/Widgets/WPropertyEditor.cpp index 5614161d..57ecfeaa 100644 --- a/src/Editor/Widgets/WPropertyEditor.cpp +++ b/src/Editor/Widgets/WPropertyEditor.cpp @@ -244,7 +244,7 @@ void WPropertyEditor::CreateEditor() WColorPicker *pColorPicker = new WColorPicker(this); CColor color = pColorCast->Get(); - QColor qcolor = QColor(color.r, color.g, color.b, color.a); + QColor qcolor = QColor(color.r * 255, color.g * 255, color.b * 255, color.a * 255); pColorPicker->setColor(qcolor); mUI.EditorWidget = pColorPicker; @@ -424,7 +424,7 @@ void WPropertyEditor::UpdateEditor() WColorPicker *pColorPicker = static_cast(mUI.EditorWidget); CColor color = pColorCast->Get(); - QColor qcolor = QColor(color.r, color.g, color.b, color.a); + QColor qcolor = QColor(color.r * 255, color.g * 255, color.b * 255, color.a * 255); pColorPicker->setColor(qcolor); break;