Merge lp:~loic.molinari/ubuntu-ui-toolkit/watch-for-shape-item-source-updates into lp:ubuntu-ui-toolkit

Proposed by Loïc Molinari
Status: Merged
Approved by: Florian Boucault
Approved revision: 1001
Merged at revision: 1009
Proposed branch: lp:~loic.molinari/ubuntu-ui-toolkit/watch-for-shape-item-source-updates
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 23 lines (+7/-0)
1 file modified
modules/Ubuntu/Components/plugin/shapeitem.cpp (+7/-0)
To merge this branch: bzr merge lp:~loic.molinari/ubuntu-ui-toolkit/watch-for-shape-item-source-updates
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Florian Boucault (community) Approve
Review via email: mp+214818@code.launchpad.net

Commit message

Watched for shape item's source updates.

Description of the change

Watched for shape item's source updates.

To post a comment you must log in.
Revision history for this message
Florian Boucault (fboucault) wrote :

Good to go.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/plugin/shapeitem.cpp'
2--- modules/Ubuntu/Components/plugin/shapeitem.cpp 2013-11-22 19:21:34 +0000
3+++ modules/Ubuntu/Components/plugin/shapeitem.cpp 2014-04-08 18:46:04 +0000
4@@ -375,6 +375,11 @@
5 return NULL;
6 }
7
8+ // Update the node whenever the source item's texture changes.
9+ if ((dirtyFlags_ & ShapeItem::DirtyImage) && provider) {
10+ QObject::connect(provider, SIGNAL(textureChanged()), this, SLOT(update()));
11+ }
12+
13 ShapeNode* node = static_cast<ShapeNode*>(old_node);
14 if (!node) {
15 node = new ShapeNode(this);
16@@ -418,6 +423,8 @@
17 textureData->coordinate[index]);
18 node->setMaterialType(image_ ? ShapeNode::TexturedMaterial : ShapeNode::ColoredMaterial);
19
20+ dirtyFlags_ = ShapeItem::NotDirty;
21+
22 return node;
23 }
24

Subscribers

People subscribed via source and target branches

to status/vote changes: