summaryrefslogtreecommitdiff
path: root/muse2/muse/plugin.cpp
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/muse/plugin.cpp
parentd225bb1f574a68a56b96fa33ebb33dcbc009383b (diff)
Fixes in plugin and save dialogs. Please see the ChangeLog.
Diffstat (limited to 'muse2/muse/plugin.cpp')
-rw-r--r--muse2/muse/plugin.cpp15
1 files changed, 13 insertions, 2 deletions
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");