Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F552
color.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
goch
Jul 7 2010, 2:32 PM
2010-07-07 14:32:01 (UTC+2)
Size
858 B
Referenced Files
None
Subscribers
None
color.patch
View Options
Index: QmitkPropertyDelegate.cpp
===================================================================
--- QmitkPropertyDelegate.cpp (revision 24406)
+++ QmitkPropertyDelegate.cpp (working copy)
@@ -96,6 +96,15 @@
colorBtn->setStyleSheet(QString("background-color: %1;foreground-color: %1; border-style: none;").arg(result.name()));
//colorBtn->setFlat(true);
}
+ // QColorDialog closed by 'Cancel' button, use the old property color
+ else
+ {
+ QPalette palette = colorBtn->palette();
+ palette.setColor(QPalette::Button, color);
+ colorBtn->setPalette(palette);
+ colorBtn->setStyleSheet(QString("background-color: %1;foreground-color: %1; border-style: none;").arg(color.name()));
+
+ }
connect(colorBtn, SIGNAL(pressed()), this, SLOT(commitAndCloseEditor()));
File Metadata
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
530
Default Alt Text
color.patch (858 B)
Attached To
Mode
T4575: Color property pop-up window not shown again after closing
Attached
Detach File
Event Timeline
•
goch
added a comment.
Jul 7 2010, 2:32 PM
2010-07-07 14:32:01 (UTC+2)
Comment Actions
Do not change color if canceled
Log In to Comment