summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Action/ActionView.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/Action/ActionView.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/Action/ActionView.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/Action/ActionView.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Authoring/Studio/Palettes/Action/ActionView.cpp b/src/Authoring/Studio/Palettes/Action/ActionView.cpp
index a0d03267..0f7cb569 100644
--- a/src/Authoring/Studio/Palettes/Action/ActionView.cpp
+++ b/src/Authoring/Studio/Palettes/Action/ActionView.cpp
@@ -1070,6 +1070,20 @@ bool ActionView::toolTipsEnabled()
return CStudioPreferences::ShouldShowTooltips();
}
+QColor ActionView::showColorDialog(const QColor &color)
+{
+ m_currentColor = color;
+ CDialogs *dialogs = g_StudioApp.GetDialogs();
+ connect(dialogs, &CDialogs::onColorChanged, this, &ActionView::changeColor);
+ return dialogs->displayColorDialog(color);
+}
+
+void ActionView::changeColor(const QColor &color)
+{
+ m_currentColor = color;
+ Q_EMIT currentColorChanged();
+}
+
void ActionView::updateActionStates()
{
bool hasValidAction = (m_currentActionIndex != -1) && m_itemHandle.Valid();