summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2010-12-09 05:26:23 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2010-12-09 05:26:23 +0000
commitd184da8dfd7cf98f0e6fcd468cb4c8a4bde55177 (patch)
treebcd105375060a4ede93c5c32fb52aa95c96f8098 /muse2/muse
parent7e43faf243da067865e7d0640cde448bb55ca7d6 (diff)
Fix column order mess
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/arranger/arranger.cpp2
-rw-r--r--muse2/muse/arranger/tlist.cpp4
-rw-r--r--muse2/muse/widgets/header.cpp6
3 files changed, 6 insertions, 6 deletions
diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp
index c7689355..7c9c5751 100644
--- a/muse2/muse/arranger/arranger.cpp
+++ b/muse2/muse/arranger/arranger.cpp
@@ -260,7 +260,7 @@ Arranger::Arranger(QMainWindow* parent, const char* name)
ib->setChecked(showTrackinfoFlag);
connect(ib, SIGNAL(toggled(bool)), SLOT(showTrackInfo(bool)));
- header = new Header(tracklist);
+ header = new Header(tracklist, "header");
header->setFixedHeight(30);
diff --git a/muse2/muse/arranger/tlist.cpp b/muse2/muse/arranger/tlist.cpp
index 0360be86..c49607f7 100644
--- a/muse2/muse/arranger/tlist.cpp
+++ b/muse2/muse/arranger/tlist.cpp
@@ -222,7 +222,7 @@ void TList::paint(const QRect& r)
int x = 0;
for (int index = 0; index < header->count(); ++index) {
- int section = header->visualIndex(index);
+ int section = header->logicalIndex(index);
int w = header->sectionSize(section);
//QRect r = p.xForm(QRect(x+2, yy, w-4, trackHeight));
QRect r = p.combinedTransform().mapRect(QRect(x+2, yy, w-4, trackHeight));
@@ -371,7 +371,7 @@ void TList::paint(const QRect& r)
int xpos = 0;
p.setPen(Qt::gray);
for (int index = 0; index < n; index++) {
- int section = header->visualIndex(index);
+ int section = header->logicalIndex(index);
xpos += header->sectionSize(section);
p.drawLine(xpos, 0, xpos, height());
}
diff --git a/muse2/muse/widgets/header.cpp b/muse2/muse/widgets/header.cpp
index 75bd2933..16cc374b 100644
--- a/muse2/muse/widgets/header.cpp
+++ b/muse2/muse/widgets/header.cpp
@@ -28,9 +28,9 @@ void Header::readStatus(Xml& xml)
{
//QStringList l = QStringList::split(QString(" "), tag);
QStringList l = tag.split(QString(" "), QString::SkipEmptyParts);
- int index = count();
+ int index = count() -1;
for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
- int section = (*it).toInt();
+ int section = visualIndex((*it).toInt());
moveSection(section, index);
--index;
}
@@ -58,7 +58,7 @@ void Header::writeStatus(int level, Xml& xml) const
xml.nput(level, "<%s> ", Xml::xmlString(objectName()).toLatin1().constData());
int n = count() - 1;
for (int i = n; i >= 0; --i)
- xml.nput("%d ", visualIndex(i));
+ xml.nput("%d ", logicalIndex(i));
//xml.put("</%s>", name());
xml.put("</%s>", Xml::xmlString(objectName()).toLatin1().constData());
}