Hide map settings when exporting layout images

This commit is contained in:
GriffinR
2025-02-05 15:31:14 -05:00
parent 2aa2f8dbd4
commit 52a900b85d
2 changed files with 7 additions and 1 deletions

View File

@@ -29,7 +29,7 @@
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="label_MapSelection">
<property name="text">
<string>Map</string>
</property>

View File

@@ -55,6 +55,12 @@ MapImageExporter::MapImageExporter(QWidget *parent, Editor *editor, ImageExporte
ui->comboBox_MapSelection->addItems(editor->project->mapNames);
ui->comboBox_MapSelection->setCurrentText(m_map->name());
ui->comboBox_MapSelection->setEnabled(false);// TODO: allow selecting map from drop-down
} else {
// Some settings only apply to maps. When exporting an image in layout-only mode we hide them.
ui->comboBox_MapSelection->setVisible(false);
ui->label_MapSelection->setVisible(false);
ui->groupBox_Events->setVisible(false);
ui->groupBox_Connections->setVisible(false);
}
connect(ui->pushButton_Save, &QPushButton::pressed, this, &MapImageExporter::saveImage);