Permalink
Browse files

0.919

  • Loading branch information...
1 parent 0aa6ea4 commit eaaeacfaeeb9ac6e8cef3e184c143aa554d4743b @konnibe committed May 26, 2012
Showing with 7 additions and 6 deletions.
  1. +5 −5 src/Logbook.cpp
  2. +2 −1 src/logbook_pi.cpp
View
@@ -1573,7 +1573,7 @@ void Logbook::getModifiedCellValue(int grid, int row, int selCol, int col)
s.Replace(_T(","),_T("."));
s.ToDouble(&d);
int h = (int) d;
- int m = 60*(d - h);
+ int m = (60*(d - h));
s = wxString::Format(_T("%i:%i"),h,m);
}
@@ -1594,8 +1594,8 @@ void Logbook::getModifiedCellValue(int grid, int row, int selCol, int col)
tkz1.GetNextToken().ToDouble(&hc);
tkz1.GetNextToken().ToDouble(&mc);
- hc_ = hc + (mc*(100/60)/100);
- hp_ = hp + (mp*(100/60)/100);
+ hc_ = hc + ((mc*(100.0/60.0))/100);
+ hp_ = hp + ((mp*(100.0/60.0))/100);
res = hc_ - hp_;
@@ -1793,10 +1793,10 @@ wxString Logbook::decimalToHours(double res,bool b)
{
int h = (int) res;
double m = res - h;
- //m = m * (60/100) * 100;
+ m = m * (60.0/100.0)*100;
wxString fmt = (b)?_T("%05i:%02.0f %s"):_T("%02i:%02.0f %s");
- wxString str = wxString::Format(fmt,h,m*100,opt->motorh.c_str());
+ wxString str = wxString::Format(fmt,h,m,opt->motorh.c_str());
return str;
}
View
@@ -618,7 +618,8 @@ void logbookkonni_pi::ShowPreferencesDialog( wxWindow* parent )
optionsDialog = new LogbookOptions(parent, opt, this, -1, _("Logbook Preferences"), wxDefaultPosition, wxSize( 655,586 ),
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
#elif defined __WXOSX__
- optionsDialog = new LogbookOptions(parent, opt, this, -1, _("Logbook Preferences"), wxDefaultPosition, wxSize( 650,691 ) ,wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ optionsDialog = new LogbookOptions(parent, opt, this, -1, _("Logbook Preferences"), wxDefaultPosition, wxSize( 650,691 ) ,
+ wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
#else
optionsDialog = new LogbookOptions(parent, opt, this, -1, _("Logbook Preferences"), wxDefaultPosition, wxSize( 740,659 ) ,
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );

0 comments on commit eaaeacf

Please sign in to comment.