OpenToonz - An open-source full-featured 2D animation creation software
C
hide fields for exportlevelpopup if pixelsonly
Jeremy Bullock027819831e0a
diff --git a/toonz/sources/toonz/exportlevelpopup.cpp b/toonz/sources/toonz/exportlevelpopup.cppindex 3dfa0d98f..35cef8344 100644--- a/toonz/sources/toonz/exportlevelpopup.cpp+++ b/toonz/sources/toonz/exportlevelpopup.cpp@@ -393,7 +393,19 @@ void ExportLevelPopup::showEvent(QShowEvent *se) {{TSelectionHandle *selectionHandle = TApp::instance()->getCurrentSelection();TSelection *selection = selectionHandle->getSelection();-+ if (Preferences::instance()->getPixelsOnly()) {+ m_exportOptions->m_widthFld->hide();+ m_exportOptions->m_heightFld->hide();+ m_exportOptions->m_widthLabel->hide();+ m_exportOptions->m_heightLabel->hide();+ m_exportOptions->m_dpiLabel->hide();+ } else {+ m_exportOptions->m_widthFld->show();+ m_exportOptions->m_heightFld->show();+ m_exportOptions->m_widthLabel->show();+ m_exportOptions->m_heightLabel->show();+ m_exportOptions->m_dpiLabel->show();+ }selectionHandle->pushSelection();selectionHandle->setSelection(selection);}@@ -730,6 +742,10 @@ ExportLevelPopup::ExportOptions::ExportOptions(QWidget *parent)m_hResFld = new DVGui::IntLineEdit;m_vResFld = new DVGui::IntLineEdit;m_dpiLabel = new QLabel;+ m_widthLabel = new QLabel;+ m_heightLabel = new QLabel;+ m_widthLabel->setText("Width: ");+ m_heightLabel->setText("Height: ");m_resScale = new DVGui::MeasuredDoubleLineEdit;m_widthFld->setRange(0, dmax);@@ -746,12 +762,9 @@ ExportLevelPopup::ExportOptions::ExportOptions(QWidget *parent)m_vResFld->setFixedSize(50, 20);m_hResFld->setFixedSize(50, 20);m_resScale->setFixedSize(50, 20);-- exportBoxLayout->addWidget(new QLabel(tr("Width:")), 0, 0,- Qt::AlignRight);+ exportBoxLayout->addWidget(m_widthLabel, 0, 0, Qt::AlignRight);exportBoxLayout->addWidget(m_widthFld, 0, 1, Qt::AlignLeft);- exportBoxLayout->addWidget(new QLabel(tr("Height:")), 0, 2,- Qt::AlignRight);+ exportBoxLayout->addWidget(m_heightLabel, 0, 2, Qt::AlignRight);exportBoxLayout->addWidget(m_heightFld, 0, 3, Qt::AlignLeft);exportBoxLayout->addWidget(m_dpiLabel, 0, 4, Qt::AlignRight);exportBoxLayout->addWidget(new QLabel(tr("H Resolution:")), 1, 0,diff --git a/toonz/sources/toonz/exportlevelpopup.h b/toonz/sources/toonz/exportlevelpopup.hindex 4980cd362..5d87e04e2 100644--- a/toonz/sources/toonz/exportlevelpopup.h+++ b/toonz/sources/toonz/exportlevelpopup.h@@ -141,7 +141,7 @@ private:DVGui::MeasuredDoubleLineEdit *m_resScale;- QLabel *m_dpiLabel;+ QLabel *m_dpiLabel, *m_widthLabel, *m_heightLabel;QComboBox *m_thicknessTransformMode;