From a659a13c531e991851e013db3d4223bf16a343b8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 24 Jan 2014 17:28:43 +0000 Subject: Fix various whitespace and formatting issues. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5325 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/BreadCrumbs.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/gui/BreadCrumbs.cpp') diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp index 8073f933..6ed0bfca 100644 --- a/src/gui/BreadCrumbs.cpp +++ b/src/gui/BreadCrumbs.cpp @@ -34,7 +34,7 @@ BreadCrumbs::BreadCrumbs(App& app) , _enable_signal(true) { app.client()->signal_object_deleted().connect( - sigc::mem_fun(this, &BreadCrumbs::object_destroyed)); + sigc::mem_fun(this, &BreadCrumbs::object_destroyed)); set_can_focus(false); } @@ -60,8 +60,8 @@ BreadCrumbs::build(Raul::Path path, SPtr view) bool old_enable_signal = _enable_signal; _enable_signal = false; - // Moving to a path we already contain, just switch the active button if (!_breadcrumbs.empty() && (path.is_parent_of(_full_path) || path == _full_path)) { + // Moving to a path we already contain, just switch the active button for (const auto& b : _breadcrumbs) { if (b->path() == path) { b->set_active(true); @@ -79,8 +79,8 @@ BreadCrumbs::build(Raul::Path path, SPtr view) _active_path = path; _enable_signal = old_enable_signal; - // Moving to a child of the full path, just append crumbs (preserve view cache) } else if (!_breadcrumbs.empty() && path.is_child_of(_full_path)) { + // Moving to a child of the full path, just append crumbs (preserve view cache) string suffix = path.substr(_full_path.length()); while (suffix.length() > 0) { @@ -102,9 +102,9 @@ BreadCrumbs::build(Raul::Path path, SPtr view) b->set_active(false); _breadcrumbs.back()->set_active(true); - // Rebuild from scratch - // Getting here is bad unless absolutely necessary, since the GraphView cache is lost } else { + // Rebuild from scratch + // Getting here is bad unless absolutely necessary, since the GraphView cache is lost _full_path = path; _active_path = path; @@ -149,11 +149,14 @@ BreadCrumbs::BreadCrumb* BreadCrumbs::create_crumb(const Raul::Path& path, SPtr view) { - BreadCrumb* but = manage(new BreadCrumb(path, - (view && path == view->graph()->path()) ? view : SPtr())); + BreadCrumb* but = manage( + new BreadCrumb(path, + ((view && path == view->graph()->path()) + ? view : SPtr()))); - but->signal_toggled().connect(sigc::bind(sigc::mem_fun( - this, &BreadCrumbs::breadcrumb_clicked), but)); + but->signal_toggled().connect( + sigc::bind(sigc::mem_fun(this, &BreadCrumbs::breadcrumb_clicked), + but)); return but; } @@ -203,4 +206,3 @@ BreadCrumbs::object_moved(const Raul::Path& old_path, const Raul::Path& new_path } // namespace GUI } // namespace Ingen - -- cgit v1.2.1