summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2006-10-04 19:39:24 +0000
committerRobert Jonsson <spamatica@gmail.com>2006-10-04 19:39:24 +0000
commitdd857add5c12eee6fc3e52e4e2da48b4539472c6 (patch)
tree488ffe07eab3f0cc5b592541160ad600b668abeb
parentfc22028e7c46c7029bbead7aa968409bd67d82ba (diff)
some fixes.
item selection done in reverse to get the right one when they are stacked
-rw-r--r--muse/ChangeLog4
-rw-r--r--muse/muse/audioinput.cpp2
-rw-r--r--muse/muse/midiedit/citem.cpp2
-rw-r--r--muse/muse/midiedit/citem.h2
-rw-r--r--muse/muse/route.cpp12
5 files changed, 19 insertions, 3 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog
index b595e5cd..f68da4df 100644
--- a/muse/ChangeLog
+++ b/muse/ChangeLog
@@ -1,3 +1,7 @@
+4.10 (rj)
+ - Select the right item when items are stacked on top of each other, for
+ pianoroll and arranger (rj)
+ - Print error message when name2route called in error (rj)
4.10 (ws)
- misc fixes for graphical controller editor
- patch for x86_64-biarch systems from Detlef Reichelt
diff --git a/muse/muse/audioinput.cpp b/muse/muse/audioinput.cpp
index 6c1f2ba9..4143196d 100644
--- a/muse/muse/audioinput.cpp
+++ b/muse/muse/audioinput.cpp
@@ -134,7 +134,7 @@ void AudioInput::deactivate()
jackPorts[i] = 0;
}
else
- printf("AudioOutput::deactivate(): not active!\n");
+ printf("AudioInput::deactivate(): not active!\n");
}
}
diff --git a/muse/muse/midiedit/citem.cpp b/muse/muse/midiedit/citem.cpp
index 0f3070f2..b7ae8287 100644
--- a/muse/muse/midiedit/citem.cpp
+++ b/muse/muse/midiedit/citem.cpp
@@ -62,7 +62,7 @@ void CItem::setSelected(bool f)
CItem* CItemList::find(const QPoint& pos) const
{
- for (ciCItem i = begin(); i != end(); ++i) {
+ for (rciCItem i = rbegin(); i != rend(); ++i) {
if (i->second->contains(pos))
return i->second;
}
diff --git a/muse/muse/midiedit/citem.h b/muse/muse/midiedit/citem.h
index 8b718838..283d2422 100644
--- a/muse/muse/midiedit/citem.h
+++ b/muse/muse/midiedit/citem.h
@@ -52,7 +52,7 @@ struct CItem {
};
typedef std::multimap<int, CItem*, std::less<int> >::iterator iCItem;
-typedef std::multimap<int, CItem*, std::less<int> >::const_iterator ciCItem;
+typedef std::multimap<int, CItem*, std::less<int> >::const_reverse_iterator rciCItem;
//---------------------------------------------------------
// CItemList
diff --git a/muse/muse/route.cpp b/muse/muse/route.cpp
index 118b75d3..c98b15cf 100644
--- a/muse/muse/route.cpp
+++ b/muse/muse/route.cpp
@@ -34,7 +34,19 @@
static Route name2route(const QString& rn, Route::RouteType t)
{
int channel = -1;
+
+ // mainly for debugging purposes, it happens that name2route is called without an entry
+ // possibly this should be removed if it's no longer the case.
+ if (rn.isEmpty()) {
+ static const char* names[] = {
+ "TRACK", "AUDIOPORT", "MIDIPORT", "SYNTIPORT"
+ };
+ printf("!!!!!!!!!!!!!!!!!!!!!! empty route!!!!!!!!!!!!!!name2route: %s: <%s> not found\n", names[t], rn.toLatin1().data());
+ return Route((Track*) 0, channel, Route::TRACK);
+
+ }
QString s(rn);
+
if (rn[0].isNumber() && rn[1]==':') {
int c = rn[0].toLatin1();
channel = c - '1';