Gracefully handle the graphics editor options when running
from within a snap. When running in snap confinement, the graphics
editor option in the preferences panel is removed and edits to an
existing decal will use xdg-open, allowing the user to select the
appropriate application for editing using the system options.
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
The Desktop.open() method does not work within a Snap confined
application because it uses gnome apis which are restricted or
only defined within the snap itself. The confined snaps allow
for xdg-open to open the default application to handle opening
the specified mime-type (application/pdf) for print previews and
printing.
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
Add plugs which use the personal-files interface for snaps to allow
the users to enable OpenRocket to access the ~/.java and ~/.openrocket
directories. Currently, these must be manually connected by the user,
so the launcher is updated to ensure the user experience degrades
appropriately when they are not connected.
This method allows for new installations to OpenRocket without any
changes and for users migrating to the snap from the jar to be able
to connect their existing preferences and databases.
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
Fix the user preferences location for snaps to go to the user's snap
directory $SNAP_USER_COMMON, which stores data across multiple versions
of the snap.
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
Snaps are a universal packaging format for Linux platforms
and is available for most major Linux distributions.
This commit adds support for building OpenRocket as a snap. The
snap convention is to place snap relevant information in the top
level snap directory. The snapcraft.yaml file provides information
regarding what should be in the snap and how to build it.
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
Check to see if column index returned from the FlightConfigurationTable
model is referencing a valid column before getting the column data.
Additionally, the FlightConfigurationTableModel was not adequately
accounting for the FCID table column when returning the column.
Fixes#677
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
Updates the print dialog to allow for simulations to be re-run
or not. Selecting the "Update simulation data" checkbox will
re-run any out of date simulations prior to generating the
design report.
Fixes#637
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
Update the transparency of the exported icons so there isn't a white
background clashing with the button color. Additionally, the tube fin
and rail button small icons were updated to be more in line with other
icons.
The tube fin is bigger and has the body tube showing like other
fin small icons.
The rail button works better in a side profile rather
than an offset profile.
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
It turns out that the assumption of radial symmetry is absolutely pervasive in our CP calculations. Looking at FinSetCalc.calculateNonAxialForces(), we don't actually compute the CP of a fin -- we calculate its X value, and pin it to Y=Z=0.
The only exception to this is in BarrowmanCalculator.calculateNonAxialForces(), where the pinning only takes place if there are three or more fins in a FinSet. If we remove the test for number of fins in the FinSet, we are in essence making the assumption that there are more fins *somewhere* which will end up being radially symmetric.