forked from qt-creator/qt-creator
Disable unsupported properties if qtForMCUs is set
When qtForMCUs is enable in the project, disables the action to open the easing curve editor in the timeline and the actions to set an interpolation to anything else than linear in the animation curve editor. Shows the disabled reason in the tooltip and paint non linear curve segments in the error color and without handles. Fixes: QDS-10061 Change-Id: I71b2af0dd6f6c10714fceb75ff3ac16c88504adf Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "detail/graphicsview.h"
|
||||
#include "detail/treeview.h"
|
||||
|
||||
#include <designermcumanager.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QDoubleSpinBox>
|
||||
@@ -106,6 +107,7 @@ CurveEditor::CurveEditor(CurveEditorModel *model, QWidget *parent)
|
||||
auto updateTimeline = [this, model](bool validTimeline) {
|
||||
if (validTimeline) {
|
||||
updateStatusLine();
|
||||
updateMcuState();
|
||||
m_view->setCurrentFrame(m_view->model()->currentFrame(), false);
|
||||
m_toolbar->updateBoundsSilent(model->minimumTime(), model->maximumTime());
|
||||
m_toolbar->show();
|
||||
@@ -163,4 +165,11 @@ void CurveEditor::updateStatusLine()
|
||||
m_statusLine->setText(currentText);
|
||||
}
|
||||
|
||||
void CurveEditor::updateMcuState()
|
||||
{
|
||||
bool isMcu = DesignerMcuManager::instance().isMCUProject();
|
||||
m_toolbar->setIsMcuProject(isMcu);
|
||||
m_view->setIsMcu(isMcu);
|
||||
}
|
||||
|
||||
} // End namespace QmlDesigner.
|
||||
|
||||
Reference in New Issue
Block a user