Merge lp:~azzar1/unity/fix-lp-1458950 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Stephen M. Webb
Approved revision: no longer in the source branch.
Merged at revision: 3980
Proposed branch: lp:~azzar1/unity/fix-lp-1458950
Merge into: lp:unity
Diff against target: 20 lines (+2/-2)
1 file modified
launcher/LauncherController.cpp (+2/-2)
To merge this branch: bzr merge lp:~azzar1/unity/fix-lp-1458950
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Stephen M. Webb (community) Approve
Review via email: mp+260580@code.launchpad.net

Commit message

Make sure new icons are added to the model before calling SortAndUpdate.

Description of the change

Make sure new icons are added to the model before calling SortAndUpdate.

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'launcher/LauncherController.cpp'
--- launcher/LauncherController.cpp 2015-05-12 13:09:39 +0000
+++ launcher/LauncherController.cpp 2015-05-29 12:47:16 +0000
@@ -757,14 +757,14 @@
757 *uri_ptr = new_uri;757 *uri_ptr = new_uri;
758 });758 });
759759
760 model_->AddIcon(icon);
761
760 if (icon->GetIconType() == AbstractLauncherIcon::IconType::APPLICATION)762 if (icon->GetIconType() == AbstractLauncherIcon::IconType::APPLICATION)
761 {763 {
762 icon->visibility_changed.connect(sigc::hide(sigc::mem_fun(this, &Impl::SortAndUpdate)));764 icon->visibility_changed.connect(sigc::hide(sigc::mem_fun(this, &Impl::SortAndUpdate)));
763 SortAndUpdate();765 SortAndUpdate();
764 }766 }
765767
766 model_->AddIcon(icon);
767
768 std::string const& path = icon->DesktopFile();768 std::string const& path = icon->DesktopFile();
769769
770 if (!path.empty())770 if (!path.empty())