Fixed wrong initial color list selection.

This commit is contained in:
leo 2015-01-17 02:02:30 +00:00
parent 3d79dbd8cc
commit a9fb816839
5 changed files with 17 additions and 0 deletions

View file

@ -103,6 +103,8 @@ void lcMainWindow::SetColorIndex(int ColorIndex)
if (mPreviewWidget)
mPreviewWidget->Redraw();
UpdateColor();
}
void lcMainWindow::SetMoveXYSnapIndex(int Index)

View file

@ -155,6 +155,7 @@ public:
void SetAddKeys(bool AddKeys);
void UpdateLockSnap();
void UpdateSnap();
void UpdateColor();
void UpdateUndoRedo(const QString& UndoText, const QString& RedoText);
void UpdateCurrentCamera(int CameraIndex);
void UpdatePerspective();

View file

@ -1180,6 +1180,11 @@ void lcQMainWindow::updateSnap()
statusSnapLabel->setText(QString(tr(" M: %1 %2 R: %3 ")).arg(gMainWindow->GetMoveXYSnapText(), gMainWindow->GetMoveZSnapText(), QString::number(gMainWindow->GetAngleSnap())));
}
void lcQMainWindow::updateColor()
{
colorList->setCurrentColor(gMainWindow->mColorIndex);
}
void lcQMainWindow::updateUndoRedo(const QString& UndoText, const QString& RedoText)
{
QAction* UndoAction = actions[LC_EDIT_UNDO];

View file

@ -38,6 +38,7 @@ public:
void setAddKeys(bool addKeys);
void updateLockSnap();
void updateSnap();
void updateColor();
void updateUndoRedo(const QString& UndoText, const QString& RedoText);
void updateTransformType(int newType);
void updateCameraMenu();

View file

@ -534,6 +534,14 @@ void lcMainWindow::UpdateSnap()
window->updateSnap();
}
void lcMainWindow::UpdateColor()
{
lcQMainWindow* window = (lcQMainWindow*)mHandle;
if (window)
window->updateColor();
}
void lcMainWindow::UpdateUndoRedo(const QString& UndoText, const QString& RedoText)
{
lcQMainWindow* window = (lcQMainWindow*)mHandle;