summaryrefslogtreecommitdiffstats
path: root/src/gui/BreadCrumbs.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-24 17:28:43 +0000
committerDavid Robillard <d@drobilla.net>2014-01-24 17:28:43 +0000
commita659a13c531e991851e013db3d4223bf16a343b8 (patch)
tree583112a95bc6abeb39dd514c987ff1c82b3d2e9e /src/gui/BreadCrumbs.cpp
parent28ab52045a429eb190ea1a23cef92d81c36748f5 (diff)
downloadingen-a659a13c531e991851e013db3d4223bf16a343b8.tar.gz
ingen-a659a13c531e991851e013db3d4223bf16a343b8.tar.bz2
ingen-a659a13c531e991851e013db3d4223bf16a343b8.zip
Fix various whitespace and formatting issues.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5325 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/BreadCrumbs.cpp')
-rw-r--r--src/gui/BreadCrumbs.cpp22
1 files changed, 12 insertions, 10 deletions
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<GraphView> 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<GraphView> 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<GraphView> 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<GraphView> view)
{
- BreadCrumb* but = manage(new BreadCrumb(path,
- (view && path == view->graph()->path()) ? view : SPtr<GraphView>()));
+ BreadCrumb* but = manage(
+ new BreadCrumb(path,
+ ((view && path == view->graph()->path())
+ ? view : SPtr<GraphView>())));
- 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
-