[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [abakus] src: fix saving history if result is not a number
From:       Mathias Kraus <k.hias () gmx ! de>
Date:       2013-02-01 19:48:32
Message-ID: 20130201194832.9FA40A6091 () git ! kde ! org
[Download RAW message or body]

Git commit 586d058525b5766441adc0b8e0f97ed9474027eb by Mathias Kraus.
Committed on 29/01/2013 at 23:05.
Pushed by mkraus into branch 'master'.

fix saving history if result is not a number

M  +4    -1    src/mainwindow.cpp

http://commits.kde.org/abakus/586d058525b5766441adc0b8e0f97ed9474027eb

diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index a0cbd2a..842cf94 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -448,6 +448,9 @@ void MainWindow::saveConfig()
     // Set precision to max for most accuracy
     Abakus::m_prec = 75;
     
+    // this is needed to save the history and variables with the biggest possible precision
+    redrawResults();
+    
     for(; it != values.end(); ++it) {
         if(NumeralModel::instance()->isValueReadOnly(*it))
             continue;
@@ -490,7 +493,7 @@ void MainWindow::saveConfig()
     {
         saveList.clear();
         saveList << historyList[i]->expression();
-        saveList << historyList[i]->resultValue().toString();
+        saveList << historyList[i]->result();
         saveList << QString("%1").arg(historyList[i]->type());
         config.writeEntry(QString("%1").arg(j, fieldWidth, 10, QLatin1Char('0')), saveList);
     }

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic