summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2018-08-09 10:09:13 +0300
committerTomi Korpipää <tomi.korpipaa@qt.io>2018-08-09 10:01:33 +0000
commit32c0357497ca7e024357a6b4272efc9a672eb29c (patch)
tree03f9ab40f465f274de7c4639c23dafc4cdbbf3de /src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
parenta95e4ac4bd08ba8b577f8298f167ac541173adf1 (diff)
Fix macOS ColorDialog crash
Got rid of the QML ColorDialog altogether, as this functionality now replaces the old functionality fully. Task-number: QT3DS-2043 Change-Id: Ia48cc996a6a4df634b29d8dba360b66f896f9510 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
index e006b958..5845a870 100644
--- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
@@ -528,6 +528,20 @@ QObject *InspectorControlView::showDataInputChooser(int handle, int instance, co
return m_dataInputChooserView;
}
+QColor InspectorControlView::showColorDialog(const QColor &color)
+{
+ m_currentColor = color;
+ CDialogs *dialogs = g_StudioApp.GetDialogs();
+ connect(dialogs, &CDialogs::onColorChanged, this, &InspectorControlView::changeColor);
+ return dialogs->displayColorDialog(color);
+}
+
+void InspectorControlView::changeColor(const QColor &color)
+{
+ m_currentColor = color;
+ Q_EMIT currentColorChanged();
+}
+
bool InspectorControlView::toolTipsEnabled()
{
return CStudioPreferences::ShouldShowTooltips();