summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse2/ChangeLog3
-rw-r--r--muse2/muse/arranger/arranger.cpp2
-rw-r--r--muse2/muse/arranger/tlist.cpp4
-rw-r--r--muse2/muse/widgets/header.cpp6
4 files changed, 9 insertions, 6 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index 1d9d5003..322ac344 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,6 @@
+09.12.2010:
+ - Fix: column orders mess up in the main window, and they do not save properly in
+ the .med files. (Orcan)
08.12.2010:
- Ported many more Qt3 methods to Qt4. (Orcan)
- Turned off Qt3Support. Muse2 is now a pure Qt4 application. (Orcan)
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());
}