View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002477 | SkyChart | 1-Software | public | 21-10-23 17:19 | 21-10-29 14:37 |
Reporter | Mattia Verga | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Summary | 0002477: Support passing multiple chart filenames to skychart executable | ||||
Description | Currently Skychart works well when a chart filename is passed to the executable as 'skychart %f': $ skychart chart1.cdc3 That opens the default chart and the file in a second tab. But trying to open multiple files at one (i.e. 'skychart %F') doesn't work: $ skychart chart1.cdc3 chart2.cdc3 only opens the latest file. | ||||
Tags | No tags attached. | ||||
|
Thank you for the fix Mattia, it work fine. https://github.com/pchev/skychart/commit/80cbd07ad64937d2ac87ae50277ec91acfa1a538 Another point, when opening chart files this way it still make the default Chart_1 in a first tab. Do you think it can be better to not add it and create only the chart we open? |
|
Yep, I saw that in pu_main.pas -> Tf_main.Init it loads a default chart and then reads params from the CLI... I didn't want to mess things up as I'm not sure if the two steps can be inverted. Sure it would be nice to open only the selected chart(s) so that we could spare some CPU cycles. |
|
Also I've noticed a couple of things while working on that commit: - the 'WantUnique' parameter is set to False by default, but I see that even running a simple 'skychart' command without --unique it will create a unique instance. Is there a use case where the program is run with WantUnique=False? - the concatenation logic of the parameters I changed is replicated in pu_main.pas -> Tf_main.UniqueInstance1OtherInstance but there it seems to work fine. I was unsure about changing that either. If a skychart instance is already running, launching another instance with two files as arguments seems already to work as expected. |
|
I forget to remove WantUnique when I change CdC to always run in single instance mode a few years ago. Probably this parameter concatenation are a remain or tentative to support parameters like "--setfov 3" instead of "--setfov=3". This can be removed. This is fixed by: https://github.com/pchev/skychart/commit/a369c968b94359a4da1169d0fad82a68dafa6006 It not work to simply skip the loading of the default chart. A solution is to detect a .cdc3 file is given in parameters and replace the default parameters before to create the first chart. I try to do that. |
|
I make the change to not load the default chart: https://github.com/pchev/skychart/commit/3328b715cc19f3fd3b7dfa7d38458be1c3205035 And a fix to not save this loaded chart as the new default: https://github.com/pchev/skychart/commit/a0983bc1eff0dd5c16ca8b98cf37d387c00aa2c6 |
|
I can confirm it is fixed. Thanks. |
Date Modified | Username | Field | Change |
---|---|---|---|
21-10-23 17:19 | Mattia Verga | New Issue | |
21-10-25 16:06 | Patrick Chevalley | Note Added: 0007250 | |
21-10-25 18:17 | Mattia Verga | Note Added: 0007252 | |
21-10-25 18:24 | Mattia Verga | Note Added: 0007253 | |
21-10-26 12:02 | Patrick Chevalley | Note Added: 0007255 | |
21-10-26 12:42 | Patrick Chevalley | Note Added: 0007256 | |
21-10-29 12:32 | Mattia Verga | Note Added: 0007262 | |
21-10-29 14:37 | Patrick Chevalley | Status | new => resolved |
21-10-29 14:37 | Patrick Chevalley | Resolution | open => fixed |