diff --git a/avogadro/qtplugins/spectra/CMakeLists.txt b/avogadro/qtplugins/spectra/CMakeLists.txt index 0bba92cf24..b9b77013d7 100644 --- a/avogadro/qtplugins/spectra/CMakeLists.txt +++ b/avogadro/qtplugins/spectra/CMakeLists.txt @@ -13,4 +13,7 @@ avogadro_plugin(Spectra "vibrationdialog.ui" ) -target_link_libraries(Spectra PRIVATE Avogadro::Vtk) +if (USE_VTK) + add_definitions(-DUSE_VTK) + target_link_libraries(Spectra PRIVATE Avogadro::Vtk) +endif() diff --git a/avogadro/qtplugins/spectra/spectra.cpp b/avogadro/qtplugins/spectra/spectra.cpp index bdf87d116f..8779e197fc 100644 --- a/avogadro/qtplugins/spectra/spectra.cpp +++ b/avogadro/qtplugins/spectra/spectra.cpp @@ -238,6 +238,7 @@ void Spectra::openDialog() m_dialog->show(); } +#ifdef USE_VTK void Spectra::showSpectraChart() { if (m_molecule == nullptr || m_molecule->vibrationFrequencies().empty()) @@ -294,6 +295,7 @@ chart->setXAxisLimits(4000.0, 0.0); chart->setYAxisLimits(maxIntensity, 0.0); m_chartDialog->show(); } +#endif void Spectra::advanceFrame() { diff --git a/avogadro/qtplugins/spectra/spectra.h b/avogadro/qtplugins/spectra/spectra.h index 840678d137..f3c53224f8 100644 --- a/avogadro/qtplugins/spectra/spectra.h +++ b/avogadro/qtplugins/spectra/spectra.h @@ -69,7 +69,9 @@ private slots: QtGui::Molecule* m_molecule; VibrationDialog* m_dialog; +#ifdef USE_VTK QScopedPointer m_chartDialog; +#endif QTimer* m_timer; diff --git a/avogadro/vtk/chartwidget.cpp b/avogadro/vtk/chartwidget.cpp index 168b074777..bc6ac306d6 100644 --- a/avogadro/vtk/chartwidget.cpp +++ b/avogadro/vtk/chartwidget.cpp @@ -123,8 +123,6 @@ void ChartWidget::setXAxisTitle(const std::string title) axis->GetTitleProperties()->SetFontSize(18); axis->GetTitleProperties()->SetBold(true); - qDebug() << " chart font " << axis->GetTitleProperties()->GetFontFamilyAsString(); - axis->GetLabelProperties()->SetFontSize(14); }