summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2010-12-10 07:51:19 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2010-12-10 07:51:19 +0000
commitd225bb1f574a68a56b96fa33ebb33dcbc009383b (patch)
treeb119bf122e02d5d3dbcde8813d3da36d947ca6a7
parent39d911b43a335ceeb8f87556de0bd2ef3418f937 (diff)
Fixed ctrl canvas not lining up with pianoroll and drumedit.
-rw-r--r--muse2/ChangeLog1
-rw-r--r--muse2/muse/ctrl/ctrledit.cpp3
-rw-r--r--muse2/muse/midiedit/drumedit.cpp6
3 files changed, 9 insertions, 1 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index 9d894106..a80f0db4 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -2,6 +2,7 @@
- More compiler and build warnings fixes. (Orcan)
- Restored the scripts menu and fixed scripts handling. Tested OK. (Orcan)
- Added left, right, up, down to shortcuts dialog. Test OK. (Tim)
+ - Fixed ctrl canvas not lining up in drumedit and pianoroll. (Orcan)
09.12.2010:
- Fix: column orders mess up in the main window, and they do not save properly in
the .med files. (Orcan)
diff --git a/muse2/muse/ctrl/ctrledit.cpp b/muse2/muse/ctrl/ctrledit.cpp
index f55fe8ef..fe04844d 100644
--- a/muse2/muse/ctrl/ctrledit.cpp
+++ b/muse2/muse/ctrl/ctrledit.cpp
@@ -42,6 +42,9 @@ CtrlEdit::CtrlEdit(QWidget* parent, MidiEditor* e, int xmag,
canvas = new CtrlCanvas(e, 0, xmag, "ctrlcanvas", panel);
QWidget* vscale = new VScale;
+ hbox->setContentsMargins(0, 0, 0, 0);
+ hbox->setSpacing (0);
+
canvas->setOrigin(-(config.division/4), 0);
canvas->setMinimumHeight(50);
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index b2a2702c..bd1a55eb 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -928,7 +928,11 @@ CtrlEdit* DrumEdit::addCtrl()
split2->setCollapsible(split2->indexOf(split1w1), false);
split1w1->setMinimumWidth(CTRL_PANEL_FIXED_WIDTH);
}
- ctrlEdit->setCanvasWidth(canvas->width());
+
+ int dw = vscroll->width() - 18;// 18 is the fixed width of the CtlEdit VScale widget.
+ if(dw < 1)
+ dw = 1;
+ ctrlEdit->setCanvasWidth(canvas->width() + dw);
ctrlEdit->show();
ctrlEditList.push_back(ctrlEdit);