summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/globe.cpp6
-rw-r--r--qt-ui/simplewidgets.cpp11
2 files changed, 8 insertions, 9 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index fb549cdd4..0f17f32fa 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -41,6 +41,11 @@ GlobeGPS::GlobeGPS(QWidget *parent) : MarbleWidget(parent),
needResetZoom(false),
editingDiveLocation(false)
{
+#ifdef MARBLE_SUBSURFACE_BRANCH
+ // we need to make sure this gets called after the command line arguments have
+ // been processed but before we initialize the rest of Marble
+ Marble::MarbleDebug::setEnabled(verbose);
+#endif
// check if Google Sat Maps are installed
// if not, check if they are in a known location
MapThemeManager mtm;
@@ -85,7 +90,6 @@ GlobeGPS::GlobeGPS(QWidget *parent) : MarbleWidget(parent),
connect(fixZoomTimer, SIGNAL(timeout()), this, SLOT(fixZoom()));
fixZoomTimer->setSingleShot(true);
installEventFilter(this);
- Marble::MarbleDebug::setEnabled(verbose);
}
bool GlobeGPS::eventFilter(QObject *obj, QEvent *ev)
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index 192de3a80..0ec03b44b 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -146,10 +146,8 @@ void RenumberDialog::renumberOnlySelected(bool selected)
void RenumberDialog::buttonClicked(QAbstractButton *button)
{
- if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole) {
- qDebug() << "Renumbering.";
+ if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole)
renumber_dives(ui.spinBox->value(), selectedOnly);
- }
}
RenumberDialog::RenumberDialog(QWidget *parent) : QDialog(parent), selectedOnly(false)
@@ -171,16 +169,13 @@ SetpointDialog *SetpointDialog::instance()
void SetpointDialog::setpointData(struct divecomputer *divecomputer, int second)
{
dc = divecomputer;
- time = second;
- qDebug() << second << time;
+ time = second < 0 ? 0 : second;
}
void SetpointDialog::buttonClicked(QAbstractButton *button)
{
- if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole) {
- qDebug() << time << (int)(1000.0 * ui.spinbox->value());
+ if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole)
add_event(dc, time, SAMPLE_EVENT_PO2, 0, (int)(1000.0 * ui.spinbox->value()), "SP change");
- }
mark_divelist_changed(true);
MainWindow::instance()->graphics()->replot();