diff widgets/PluginParameterDialog.cpp @ 456:035d62c4cddf

* Permit viewing (though not editing) colour 3d plot layer data in the spreadsheet data viewer dialog * Add somewhat simplistic RDF export for layers * Fix display of peak frequencies in spectrum layer * Fix (I hope) sizing of plugin parameter dialog
author Chris Cannam
date Tue, 02 Dec 2008 17:17:25 +0000
parents c803eb18ebba
children 5f9a257598d8
line wrap: on
line diff
--- a/widgets/PluginParameterDialog.cpp	Mon Dec 01 16:45:17 2008 +0000
+++ b/widgets/PluginParameterDialog.cpp	Tue Dec 02 17:17:25 2008 +0000
@@ -239,7 +239,7 @@
     m_advancedVisible = settings.value("advancedvisible", false).toBool();
     settings.endGroup();
     
-    m_advanced->setVisible(false);
+    m_advanced->hide();
 
     hbox->addWidget(m_advancedButton);
     m_advancedButton->hide();
@@ -257,6 +257,14 @@
 {
 }
 
+int
+PluginParameterDialog::exec()
+{
+    show();
+    setAdvancedVisible(m_advancedVisible);
+    return QDialog::exec();
+}
+
 
 void
 PluginParameterDialog::setOutputLabel(QString text,
@@ -584,28 +592,32 @@
 void
 PluginParameterDialog::setAdvancedVisible(bool visible)
 {
-    m_advanced->setVisible(visible);
+//    m_advanced->setVisible(visible);
 
     if (visible) {
         m_advancedButton->setText(tr("Advanced <<"));
         m_advancedButton->setChecked(true);
+        m_advanced->show();
     } else {
+        m_advanced->hide();
         m_advancedButton->setText(tr("Advanced >>"));
         m_advancedButton->setChecked(false);
     }
 
+    std::cerr << "resize to " << sizeHint().width() << " x " << sizeHint().height() << std::endl;
+
+//    setMinimumHeight(sizeHint().height());
+    adjustSize();
+
+//    (sizeHint());
+
+    m_advancedVisible = visible;
+
     QSettings settings;
     settings.beginGroup("PluginParameterDialog");
     settings.setValue("advancedvisible", visible);
     settings.endGroup();
 
-//    std::cerr << "resize to " << sizeHint().width() << " x " << sizeHint().height() << std::endl;
-
-    setMinimumHeight(sizeHint().height());
-    adjustSize();
-
-    m_advancedVisible = visible;
-
 //    if (visible) setMaximumHeight(sizeHint().height());
 //    adjustSize();
 }