Added completion for buddy, divemaster, location and suit.
The completions uses some models that I created in the last
commit - everytime that a divelog file is loaded, it creates
a list of completion items.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added classes to handle the completion of dive editions, the
classes are BuddyCompletionModel, DiveMasterCompletionModel,
SuitCompletionModel and LocationCompletionModel, thanks to
plain old C macros, code got really small. and I hope the
logic is better than the Gtk version. :)
Now next step is to integrate it to the Ui. shouldn't be hard.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This patches fixes showing back the labels 'Dive master' and 'Buddy'
after a trip selection was done, then back to single dive selection.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This patch makes the auto editon behave in a better way,
now you can scroll the notes widget without marking it as
editable, and also adds a bit of code cleanup, and a better
logic for editing the other widgets.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This bug manifested itself as too long deco obligation when moving
waypoints to later and then back to earlier times as all intermedite
versions were created as dives in the divelist (and the saturation of
these "previous dives" was taken into account.
It is not entirely clear to me how the dive will be permanently added to
the divelist once ok is pressed: One could in createDecoStops allocate
struct dive from the heap rather than from the stack and return a pointer
to it and which is then added to the dive list upon pressing ok.
[Dirk Hohndel: add include file to make this compile]
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The current QTextDocument implementation is slow due to
HTML parsing. By using QTableView with QAbstractTableModel
we boost the performance of the table print drastically.
This patch completely replaces the old solution.
There is a hidden QTableView widget which is populated
with all data and rendered using a QPainter attached to
the printer device.
A couple of new classes are added in models.h/cpp
that handle the table print model and these are then used
in printlayout.h/cpp.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
QObject::tr() has source string as first argument and disambiguation as
second argument. Currently the events shows "Starts with space!" instead
of " begin" or " end" after the event name.
Signed-off-by: Michael Andreen <harv@ruin.nu>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since the tooltip text was used as key in the map, two events of the
same type, close to eachother, would cause one of them to not be
removed.
Since ToolTip::removeToolTip() isn't used, we don't need a QMap and can
use a QList instead, so all tooltips are properly cleared.
Signed-off-by: Michael Andreen <harv@ruin.nu>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added the possibility to choose gases in the planner,
now the user should click on the name of the gas, a
popup window will appear, asking the user to choose
what gas he wants for that ascent / descent.
now we need to hook that up with the createDecoStops
method that calculates the decompression.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added the current gas used on the planner, now it's a matter
of choosing the new gas, that will be done in the next commit.e
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added a button and a method to reduce time on the dive
planner. The dive planner will not reduce below deco-time
and it will also not reduce below TIME_INITIAL_MAX.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added the code to reduce depth on the planner. Depth
cannot be lower than 40m and it also won't let the
user reduce if there's any point on the 'reduced' area.
the icon is ugly - we need an artist.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
The Working Press didn't correctly updated when there was a 'bar'
or 'psi' in the string ( and that was defalt behaviour );
The o2 didn't correctly updated when there was a '%' on the string
(and that was default behaviour ),
The He didn't correctly updated when there was a '%' on the string,
and that was also default behavior.
Now all of them correctly updates.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This is a follow up commit to the previous one that
enabled cancel for cylinders, everything in the commit
log for the cylinders also applyes here.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Made the default 'Cancel' action correctly cancel
the cylinder edition. This is needed only because
we bypassed the default behavior on Qt that took
care of this, because we wanted to have more control
on how the view would update the items accordingly
with wich one of the cylinders were selected
on the edition pane - the pressure and size of the
cylinders needed to have it's data set, but the Qt
Model/View system *thinks* that cancel-edition is
simply 'do not commit the edition data, then.' wich
would not work with us, because we passed the strange
data already. So, I created a backup data that serves
us very well. When the user cancels, this backup data
is added back on the cylinder, making everything as
it was before.
[Dirk Hohndel: removed the inadvertendly added boost header]
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds the getColor() helper function to
ProfileGraphicsView and EventItem so that retrieving
a certain color can depend on a 'isGrayscale' flag.
This flag is private and only set by
ProfileGraphicsView::setPrintMode() at this point.
EventItem also now accepts 'grayscale' as a constructor
argument.
A couple of side modifications are:
- move setBackgroundBrush() to ProfileGraphicsView::plot()
- set the same pen color as brush color for the dot in the
'!' symbol inside EventItem::EventItem().
TODO: look for color issues when printing using the
custom grayscale table
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
We pass the value of 'color_selected' stored in the
print options to ProfileGraphicsView::setPrintMode().
This way the profile can be printed in grayscale
internally instead of converting a QPixmap to
grayscale.
There are a couple of questions here:
1) Are all the 'if/then' checks for all individual
colors faster than the direct QPixmap/QImage grayscale
coversation.
2) The direct grayscale conversation does not give
control of individual colors, but can it look actually
better?
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
(experimental)
Add the method PrintLayout::convertPixmapToGrayscale()
to convert a rendered profile pixmap to grayscale.
It will probably be faster to have
ProfileGraphicsView render in grayscale under certain
conditions (and use a specific color table) instead -
e.g.:
ProfileGraphicsView::setPrintMode(bool printMode,
bool useGrayScale);
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
PrintLayout::printSixDives() goes trough all dives
and prints their profiles on full portrait pages.
This method is based on resizing the ProfileGraphicsView
widget, plotting each dive and then 'grabbing' it using
QPixmap::grabWidget().
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
When printing the profile there are certain features which
we want different (or disabled). This includes font scale ignoring
and showing a toolip. To achieve that we check for a printMode flag
in ProfileGraphicsView which can be set using setPrintMode(bool).
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
There is a potential issue when placing a heading on a new
page. If the height of a data row is larger of that of
a heading, a new heading can end up at the bottom of a page
leaving that page with two headings.
To solve that we add line breaks (<br>) until the new
page is reached and add the heading there. Algorithm
assumes that the height of a heading is larger than
a line break. Also it is now obviously even slower.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
QTextDocument uses a separate painting device,
thus we need to pass our QPrinter instance which may
have a resolution different from the screen resolution.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Don't set the cylinders and weight types if they are
the same than before, this fixes a bad thing that happened
when playing with the values. it could blank out the values
carefully chosen by you.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This is a linus request, adds a Single-click edition
on the tableview to make it more consistent with the
rest of the interface where edition is permitted.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
So, I used the Qt Event Filter strategy to bypass the normal role
of user interaction, the Qt ComboBox needed 2 keypresses to close
and edit. so I grabbed the first one and send together a second one.
Há.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This patch fixes the combobox behavior on the inline edit
to what it was ( well, similar to ) the GTK version,
up and arrow keys will walk you to the list of choices,
and it will update the other data as soon as you walks over it
one drawback is that you cant ( for now, since I do have a
very big headache at the moment ) cancel, since the cancel
will just forgets the item and do not call 'setData' on the
model, but we already called it while walking on the list.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Adds spport for key_up and key_down in the combobox
delegates, now when you press key_up or down, it will
show the list of choices instead of going one-by-one
in the lineedit.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This modifications makes the About dialog spacing more
consitent with different font sizes. Tested on
Ubuntu 12.04 with the 'Universal Access->Text size'
settings.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It might be a good practice to declare certain class
'helper' functions as constant members. But I don't
think there are performance benefits to that other
than the readability ones.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
We use the DiveItem struct from models.h so to ease the
display of date, depth and duration. All columns present
in the GTK build are now displayed.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Add this helper so that we can easily wrap the required
memory release after calling get_dive_date_string()
(fixes a small memory leak).
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Patch does:
- set individual column width and name
(held in tableColumnNames, tableColumnWidths)
- reduce font size in the table
- more small tweaks in the style sheet
TODO: finish printing all dive data
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
We don't really need includes of display.h and dive.h in
printoptions.h and printlayout.h or forward declartions
of 'struct dive' and 'struct options' in there.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
also includes:
- experiment with colored background for headings
- experiment with 'left' alignment for headings
('th' tag CSS does not support 'text-align')
- whitespace fixes
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Currently only for the table print, but now we use the
actual dive table to iterate trough all dives (find only
selected if needed) and print their 'number' element
in table rows.
Also improves the new-page detection algorithm slightly.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
PrintLayout for now only handles the table print,
while the data output itself is work in progress.
For now there is a simple HTML/CSS table logic based
on QTextDocument. There is an iterative algorithm
which listens for a page increase and adds a heading
on top of the new page.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Use a QPrintPreviewDialog, while the print logic is WIP.
This way Qt will show the print output in a window instead
of exporting to a file and opending it manualy.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
The setup() method will be called each time to obtain the
current printer settings. Also it calculates required scalling
based on screen agains printer DPI.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
PrintLayout is a class that will handle the layouting part
of dive profiles, text, tables depending on the settings
of a QPrinter and the PrinterDialog and PrintOptions
instances.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
By connecting to slots we always modify values at a previously
set 'struct options' pointer.
Also have the setup of slots and pre-set values in a
separate setup(struct options *) function.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Tab order should begin from the topmost widget and then
descend towards the bottom end of the dialog.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
The PrintOptions widget has value labels next to the
horizontal sliders. Add slots to update these labels
when a slider moves.
Patch also makes a modification so that the PrintOptions
constructor requires a 'struct options' pointer. If
an options struct is not received we do not set predefined
values and do not connect signals to slots, where
options will be updated immediately.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
- adds missing file printoptions.ui
- adds all controls present in the GTK version of the
print dialog custom tab
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
PrintOptions is a QWidget class to be used as an
addition to a future print dialog (possibly based on
QPrintDialog). Currently only contains a couple of
radio buttons.
PrintDialog (printdialog.cpp/h) which is a basic QDialog
is currently added for testing only and it holds
an instance of PrintOptions.
Calling File->Print opens this test dialog for now.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
While in zoomed mode and when resizing the splitters or
switching views the profile tooltip can end up being at the
wrong location and also the zoom state becomes corrupt,
so perhaps the entire transformation needs to be reset.
To prevent the bug we listen for relevent to the profile
splitter resize event, view changes and clear()/plot() the
entire profile graphics.
This is an slow/expensive solution and perhaps there are
cheaper alternatives e.g. updating only the scene rectangle
and tooltip, somehow.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove a couple of expand() calls(?). Also store the last
expanded rectangle size in the private variable nextRectangle
and use that in collapse() animation. Patch prevents a small
jump/resize glitch if the user quickly hovers over and out
of the profile while the tooltip is still resizing.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When collapsing the tooltip we want it's border to become
the same height as when no tooltip info was visible - i.e. post
creation.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
So during my Maui trip, I had a short hiatus in diving, causing
subsurface to start a new trip for the last day of diving. I could have
just started the old gtk branch to fix it up, but decided that I might
as well try to implement the "merge trip" logic in the Qt branch instead.
This is the end result of that.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
QGraphicsView::AnchorUnderMouse does not work for
Qt 4.8.1 on Ubuntu 12.04 and if the mouseMoveEvent
overload is disabled it practically can be seen that
the anchor point is [0, 0] instead of the mouse location.
After a suggestion found on the web this patch attempts
to use the hidden scroll bars to calculate reposition
on pan and zoom *near the mouse cursor.
On the other hand QAbstactSlider (QScrollBar) class
strangly uses negative offsets for minimum scroll
position, which makes the implementation even more
ugly.
[*near] because it's not that accurate!
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Makes it easier to see colored lines - e.g. velocity
with 20 levels of zoom.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The 'else if' condition in ProfileGraphicsView::wheelEvent()
is causing a zoom-in / zoom-out loop at zoomLevel = 10.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added a messageBox to warn the user that he quit with a working
plan, to reduce the risk of unwanted loss of work.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added the left / right shortcuts for moving the handlers around in time,
this also made me wonder why we have the 'previous dc' on the menu, it
got actually to broke my code on the shortcuts for the planner because
they are active everytime - should they be active only when the profile's
visible or they serve any other purpose?
If they serve only for the profile, I'll get them out of the menu and
put them in their proper place - the profile view.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added 'up' and 'down' keyboard actions on the dive planner,
you need to select the handlers with ctrl + click, then
press up to make the handler go 1m up, or down, to make the
handler go 1m down.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added a delete action from the keyboard, there's also
a possibility to add the same action from the menu, but
I frankly don't like much the idea. so, to delete a handler
now, you need to select it ( ctrl + click ) then press
the delete button. Multiple delection is also possible.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added a shortcut to the esc key, so it clears the selection,
if there's no selection, it acts just like clicking on the 'cancel'
button. Next: delete selected handlers.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Make possible to select an handler by ctrl+click on it,
this will be used in the future for the shortcut actions,
like delete, arrow keys, and such.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
So, it was on the docs, but I didn't read it before, if the
scene has items that ignores transformations, we need to
pass the view transform to the method that gets the items
in the scene. I also used IntersectsItemBoundingRect instead
of IntersectsItemsShape because it's faster, and our items
are small, so we don't need an very accurate but slower method.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Make it possible to drag a handle between handlers,
this way the configuration of the dive is more acurate
and easyer to make. I'v discovered a problem where it's
a bit hard to 'grab' the handler, investigating it now.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Make it possible to add a handler between others,
someone asked why I didn't make like this from the
beginning, the answer is that I wanted to have something
stable before messing a bit more with the planner, but
since the planer is almost-stable, I added. :)
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Better positioning of buttons on the dive planner. The ok / cancel
buttons are in the correct place, and the '+' sign for time will not
overlap the time string anymore.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
To draw the white outline around profile text we trace a text path
using QPainterPath::addText() and then create a couple of
QGraphicsPathItem objects. One of the objects is outlined using
QPainterPathStroker and is placed at the bottom of a QGraphicsItemGroup
with a white brush. The other object holds the standard colored text
and is placed on top.
Notes:
- possibly quite expensive on older machines
- ProfileGraphicsView::plot_text() now returns a QGraphicsItemGroup
- QGraphicsSimpleTextItem uses a top-left baseline anchor
while QPainterPath::addText() uses a bottom-left baseline
which is a bit mysterious, requires the -3 offset for a match
and is possibly non-portable across fonts and sizes.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Makes the increase time button to work, it will
increase the minimum time, not the correct time of the
dive. the total time is calculated by the deco, and
does not come from this, unless the deco is smaller
than the minimum time.
This patch also fixes the problem where a button
would only click once - I was holding the first
clicked button as the 'mouse grabber', bad tomaz.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Make the increase depth button to work, it also adds
a 'safety' stop at 150m, I know that this is deep, and
maybe we need to adjust this to a better safety stop.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Removed the user-entered lines on the plan, keeping only deco,
This way the graph looks way prettier and we don't loose any
functionality.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Change the color of the DepthString based on it's deepness
on the profile planner. The new color of the profileString
( the string that follows the mouse stating how deep you are)
is now interpolated from SAMPLE_SHALLOW and SAMPLE_DEEP -
but since those two colors were the same and I had to change
it so that could work, I want somebody to check if my choose
of colors were ok.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Use the same profile colors on the planner for the Time and Depth
rulers. this needed a new method on the rulers - setColor, that
will call the setPen method and make everything behave properly.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
The last tick to the rulers were missing, this was making
them to look odd, this make the rulers better looking,
but it caused the other-non-ported-yet-to-percent stuff
to behave in a not so good way, most visible one is the
handlers, gonna update them next.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Changed the ruler so that they work with percentages,
also added a new method to the rules to set the size of the
ticks.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added a method and a simple stub to position things on the canvas
using percentage - this way I have a proper control on where I want
to put things on screen and it will make simpler for future changes,
even if the amount of code written is a bit bigger.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Share the background for profile and planner. Those are not the same
class, but they should behave somwheat the same.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added 2 new files, graphicsview-common.h/cpp, that should have
the common stuff shared between the dive profile viewer and
the dive planner. the amount of duplicated code would be huge
if we go the road of two different classes for each one, but
since the planner took a more 'Qtish' way of behavior, in
comparisson to the profile - that's most a Cairo-To-Qt literal
translation, we cant easily merge the code without a complete
( and unwanted ) reestruturation of the profile code, thus,
this new files will serve as a bridge between them. Initially
I put there only the colors - since that's wat most easilyy
shareable.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Goal: no blending between profile text and graph lines
Qt doesn't seem to provide an easy-to-go solution in terms
of styling the z-order of the pen and brush layers of a
QAbstractGraphicsShapeItem (or alternatively pen offset),
which is needed if for example one likes the pen not
to cover the text fill.
Calling QGraphicsSimpleTextItem->setPen() on small text can
cover bigger portions of the text, as the pen ends on top of the
fill and given the pen stroke path ends up scaling exactly
at the fill path border but not on the outside, for example.
Since we don't get quick control over that (and to avoid
the issue in a naive way), we set the text as bold
and the white outline lands over the "bold-ed" area of glyphs.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In certain conditions a number such as '51' could end up being
partially hidden under the white bounding box in such a way
that the digit '1' is barely visible. Putting the bounding
box bellow all plot data solves the issue.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
While most dialogs can be open and the main application window
can still be accessed, certain should possibly be modal
in these terms.
This patch proposes the download from webservice and DC dialogs
to lock the main application window until they are closed, with
the consideration of preventing eventual unexpected behavior
in the divelist if both dialogs are active at the same time.
To solve that QtDialog::exec() is used instead of
QtWidget::show().
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Most child windows should be closed with the main application
window otherwise if left open and if making specific
modifictions could potentially cause a SIGSEGV.
To solve that we mark all custom windows/dialogs with
the Qt::WA_QuitOnClose attribute on instance creation.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added the ok / cancel buttons on the dive planner canvas.
I still need to hook the esc button to cancel it too, but
since I removed the 'floating dialog' option and merged it
into the mainwindow, it's necessary.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Now, activating the dive planner will hide the profile
and show the planner on the same place. we still need
a way to 'cancel' or 'accept' the profile created.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
We always resize if the dive is longer than the current scale allows, but
we don't shrink it overly aggressively and we never shrink it below the
initial size.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Prior to this change the visual feedback (the handle that is drawn when
the user moves the mouse while pressing the left mouse button) would not
move to an illegal position (one that is impossible without time
travel), but it the user moved the mouse to such an illegal position and
then released the mouse button, we still added that illegal position to
the plan.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove a couple of TextLabel text entries from maintab.ui
which can be seen right after program start and if no dives
are present.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>