Skip to content

Commit ce84403

Browse files
committed
Bugfixes in import/export wizard
Trigger build 3391. (GanttProject 3.4 Beta II)
1 parent 2fe8d44 commit ce84403

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

ganttproject-builder/BUILD-HISTORY-MAJOR

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
2025-07-04 3390 Test build of GanttProject 3.4 Beta I ....
1212
2026-01-16 3390 Test build of GanttProject 3.4 Beta I ....
1313
2026-01-17 3390 Test build of GanttProject 3.4 Beta I ...............
14-
2026-02-14 3391 Test build of GanttProject 3.4 Beta II
14+
2026-02-14 3391 Test build of GanttProject 3.4 Beta II.
1515
--

ganttproject/src/main/java/net/sourceforge/ganttproject/export/ExportFileChooserPage.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ internal class ExportFileChooserPage(
6060
proposeChosenFile = {
6161
proposeOutputFile(myProject, myState.exporter) ?: File(defaultFileName)
6262
}
63-
overwriteOption.addChangeValueListener { tryChosenFile(myState.file) }
63+
overwriteOption.addChangeValueListener { tryChosenFile(chooser.file) }
64+
selectedFileProperty.addListener { _, _, newValue ->
65+
myState.file = newValue
66+
}
6467
}
6568

6669
override fun validateFile(file: File?): Result<File, String> {

ganttproject/src/main/java/net/sourceforge/ganttproject/export/ExportFileWizardImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ public void changeValue(ChangeValueEvent event) {
7676
}
7777

7878
var fileChooserPage = new ExportFileChooserPage(myState, myProject, exportNode, uiFacade);
79+
fileChooserPage.getSelectedFileProperty().addListener( (observable, oldValue, newValue) -> {
80+
wizardModel.getNeedsRefresh().set(true, this);
81+
});
7982
wizardModel.addPage(new ExporterChooserPageFx(ourExporters, myState));
8083
wizardModel.addPage(fileChooserPage);
8184
wizardModel.setOnOk(() -> {

ganttproject/src/main/java/net/sourceforge/ganttproject/export/ExporterChooserPageFx.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ class ExporterChooserPageFx(exporters: List<Exporter>, private val model: State)
6060
}
6161

6262
override fun setActive(b: Boolean) {
63-
63+
if (!b) {
64+
model.exporter.options.commit()
65+
}
6466
}
6567
}
6668

ganttproject/src/main/java/net/sourceforge/ganttproject/importer/ImportFileWizard.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class ImportFileWizard(uiFacade: UIFacade, project: IGanttProject, pluginPrefere
5151
filePage.selectedFileProperty.addListener { _, _, _ ->
5252
wizardModel.needsRefresh.set(true, this)
5353
}
54+
wizardModel.importer = importers.firstOrNull()
5455
wizardModel.addPage(ImporterChooserPageFx(importers, wizardModel))
5556
wizardModel.addPage(filePage)
5657
wizardModel.customPageProperty.addListener { _, oldValue, newValue ->
@@ -137,8 +138,7 @@ private class ImporterChooserPageFx(importers: List<Importer>, model: ImporterWi
137138

138139
override val component: Component? = null
139140

140-
override fun setActive(b: Boolean) {
141-
}
141+
override fun setActive(b: Boolean) {}
142142
}
143143

144144
// --------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)