diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-08-16 14:45:05 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@qt.io> | 2018-08-17 04:01:36 +0000 |
commit | e53fe016e071c00967beb0b8e9b0755d78d70cb5 (patch) | |
tree | b94a100f454287460f5a5cc7aa38011378bd1a08 /src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp | |
parent | f46396c1b1fed03259da7d4cb2972be11c069239 (diff) |
Fix color selection issues
- Color dialog selection only affects the selected property
- Timebar color setting is now actually committed
- Canceling color dialog when setting color property value in action
palette now restores the old color
Task-number: QT3DS-2080
Change-Id: I67f6869f59c1840d76edcbaff5f9026cb3e00194
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp')
-rw-r--r-- | src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp index fbe799b2..5ab6cb91 100644 --- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp +++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp @@ -533,18 +533,14 @@ QColor InspectorControlView::showColorDialog(const QColor &color) { m_currentColor = color; CDialogs *dialogs = g_StudioApp.GetDialogs(); - connect(dialogs, &CDialogs::onColorChanged, this, &InspectorControlView::changeColor); + connect(dialogs, &CDialogs::onColorChanged, + this, &InspectorControlView::dialogCurrentColorChanged); QColor currentColor = dialogs->displayColorDialog(color); - disconnect(dialogs, &CDialogs::onColorChanged, this, &InspectorControlView::changeColor); + disconnect(dialogs, &CDialogs::onColorChanged, + this, &InspectorControlView::dialogCurrentColorChanged); return currentColor; } -void InspectorControlView::changeColor(const QColor &color) -{ - m_currentColor = color; - Q_EMIT currentColorChanged(); -} - bool InspectorControlView::toolTipsEnabled() { return CStudioPreferences::ShouldShowTooltips(); |