summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/PatchWindow.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-23 07:18:39 +0000
committerDavid Robillard <d@drobilla.net>2007-02-23 07:18:39 +0000
commit8a7533dffc55a61574900cc6a7d6791740ad338d (patch)
tree91d93a28d0c2ff5113d81ad34465dbf449dd1926 /src/progs/ingenuity/PatchWindow.cpp
parentc3bc821d163561e5542b41788548e4972fdc12e9 (diff)
downloadingen-8a7533dffc55a61574900cc6a7d6791740ad338d.tar.gz
ingen-8a7533dffc55a61574900cc6a7d6791740ad338d.tar.bz2
ingen-8a7533dffc55a61574900cc6a7d6791740ad338d.zip
Toolbar/breadcrumb fixes.
git-svn-id: http://svn.drobilla.net/lad/ingen@329 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/PatchWindow.cpp')
-rw-r--r--src/progs/ingenuity/PatchWindow.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/progs/ingenuity/PatchWindow.cpp b/src/progs/ingenuity/PatchWindow.cpp
index d4e7f1cc..add0f16f 100644
--- a/src/progs/ingenuity/PatchWindow.cpp
+++ b/src/progs/ingenuity/PatchWindow.cpp
@@ -1,4 +1,5 @@
/* This file is part of Ingen.
+ e< "\n\tcycle_start: " << _cycle_time.start_ticks()
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
*
* Ingen is free software; you can redistribute it and/or modify it under the
@@ -161,29 +162,30 @@ PatchWindow::set_patch(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view)
_patch = patch;
- _view = _breadcrumb_box->view(patch->path());
+ _view = view;
+
+ if (!_view)
+ _view = _breadcrumb_box->view(patch->path());
if (!_view)
_view = PatchView::create(patch);
- else
- assert(!view || _view == view);
assert(_view);
- // Add view to ourself
+ // Add view to our viewport
if (_view->get_parent())
- _view->get_parent()->remove(*_view);
+ _view->get_parent()->remove(*_view.get());
_viewport->remove();
_viewport->add(*_view.get());
- // Add our breadcrumbs to the view
if (_breadcrumb_box->get_parent())
_breadcrumb_box->get_parent()->remove(*_breadcrumb_box);
_view->breadcrumb_container()->remove();
_view->breadcrumb_container()->add(*_breadcrumb_box);
+ _view->breadcrumb_container()->show();
_breadcrumb_box->build(patch->path(), _view);
_breadcrumb_box->show();