summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2010-12-10 09:38:40 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2010-12-10 09:38:40 +0000
commit4f11ef1b0124517e14712ffae284198db47d4d8d (patch)
tree208cc8bb89e18969686aeac346c5195010275995 /muse2
parentd225bb1f574a68a56b96fa33ebb33dcbc009383b (diff)
Fixes in plugin and save dialogs. Please see the ChangeLog.
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog6
-rw-r--r--muse2/muse/mixer/rack.cpp8
-rw-r--r--muse2/muse/plugin.cpp15
-rw-r--r--muse2/muse/plugin.h22
-rw-r--r--muse2/muse/widgets/filedialog.cpp1
5 files changed, 41 insertions, 11 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index a80f0db4..b44133dc 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -3,6 +3,12 @@
- 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)
+ - Fix: Save project file dialog should have a "Save" button instead of "Open". (Orcan)
+ - Fix: Crash when Ok is clicked in the plugin selection dialog with no plugins
+ selected. Well, I fixed the crash, then I also disabled the Ok button until
+ a plugin is selected. (Orcan)
+ - Feature: Middle mouse button click on a plugin in the rack will (un)byass the
+ plugin. (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/mixer/rack.cpp b/muse2/muse/mixer/rack.cpp
index b979b420..a8bd1c62 100644
--- a/muse2/muse/mixer/rack.cpp
+++ b/muse2/muse/mixer/rack.cpp
@@ -504,7 +504,13 @@ void EffectRack::mousePressEvent(QMouseEvent *event)
menuRequested(itemAt(event->pos()));
return;
}
-
+ else if(event->button() & Qt::MiddleButton) {
+ int idx = row(itemAt(event->pos()));
+ bool flag = !track->efxPipe()->isOn(idx);
+ track->efxPipe()->setOn(idx, flag);
+ updateContents();
+ }
+
QListWidget::mousePressEvent(event);
}
diff --git a/muse2/muse/plugin.cpp b/muse2/muse/plugin.cpp
index 7786424a..3ddb0baf 100644
--- a/muse2/muse/plugin.cpp
+++ b/muse2/muse/plugin.cpp
@@ -2574,10 +2574,11 @@ PluginDialog::PluginDialog(QWidget* parent)
QBoxLayout* w5 = new QHBoxLayout;
layout->addLayout(w5);
- QPushButton* okB = new QPushButton(tr("Ok"), this);
+ okB = new QPushButton(tr("Ok"), this);
okB->setDefault(true);
QPushButton* cancelB = new QPushButton(tr("Cancel"), this);
okB->setFixedWidth(80);
+ okB->setEnabled(false);
cancelB->setFixedWidth(80);
w5->addWidget(okB);
w5->addSpacing(12);
@@ -2646,6 +2647,7 @@ PluginDialog::PluginDialog(QWidget* parent)
fillPlugs(selectedPlugType);
connect(pList, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), SLOT(accept()));
+ connect(pList, SIGNAL(itemClicked(QTreeWidgetItem*,int)), SLOT(enableOkB()));
connect(cancelB, SIGNAL(clicked()), SLOT(reject()));
connect(okB, SIGNAL(clicked()), SLOT(accept()));
connect(plugSel, SIGNAL(buttonClicked(QAbstractButton*)), SLOT(fillPlugs(QAbstractButton*)));
@@ -2654,12 +2656,21 @@ PluginDialog::PluginDialog(QWidget* parent)
}
//---------------------------------------------------------
+// enableOkB
+//---------------------------------------------------------
+
+void PluginDialog::enableOkB()
+ {
+ okB->setEnabled(true);
+ }
+
+//---------------------------------------------------------
// value
//---------------------------------------------------------
Plugin* PluginDialog::value()
{
- QTreeWidgetItem* item = pList->selectedItems().at(0);
+ QTreeWidgetItem* item = pList->currentItem();
if (item)
return plugins.find(item->text(0), item->text(1));
printf("plugin not found\n");
diff --git a/muse2/muse/plugin.h b/muse2/muse/plugin.h
index fbe6169e..24173de4 100644
--- a/muse2/muse/plugin.h
+++ b/muse2/muse/plugin.h
@@ -523,6 +523,7 @@ class PluginDialog : public QDialog {
QRadioButton* onlyM;
QRadioButton* onlyS;
QRadioButton* onlySM;
+ QPushButton *okB;
Q_OBJECT
@@ -531,14 +532,19 @@ class PluginDialog : public QDialog {
static Plugin* getPlugin(QWidget* parent);
Plugin* value();
void accept();
-public slots:
- void fillPlugs(QAbstractButton*);
- void fillPlugs(int i);
- void fillPlugs(const QString& sortValue);
- private:
- QComboBox *sortBox;
- static int selectedPlugType;
- static QStringList sortItems;
+
+ public slots:
+ void fillPlugs(QAbstractButton*);
+ void fillPlugs(int i);
+ void fillPlugs(const QString& sortValue);
+
+ private slots:
+ void enableOkB();
+
+ private:
+ QComboBox *sortBox;
+ static int selectedPlugType;
+ static QStringList sortItems;
};
extern void initPlugins();
diff --git a/muse2/muse/widgets/filedialog.cpp b/muse2/muse/widgets/filedialog.cpp
index b02aefbc..81791f6b 100644
--- a/muse2/muse/widgets/filedialog.cpp
+++ b/muse2/muse/widgets/filedialog.cpp
@@ -185,6 +185,7 @@ MFileDialog::MFileDialog(const QString& dir,
connect(this, SIGNAL(directoryEntered(const QString&)), SLOT(directoryChanged(const QString&)));
if (writeFlag) {
+ setAcceptMode(QFileDialog::AcceptSave);
buttons.globalButton->setEnabled(false);
switch (lastViewUsed) {
case GLOBAL_VIEW: