StoredViewDialog.cpp   StoredViewDialog.cpp 
skipping to change at line 18 skipping to change at line 18
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "StoredViewDialog.hpp" #include "StoredViewDialog.hpp"
#include "StoredViewDialog_p.hpp" #include "StoredViewDialog_p.hpp"
#include "Scenery3dMgr.hpp" #include "Scenery3dMgr.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
skipping to change at line 137 skipping to change at line 137
ui->textEditDescription->clear(); ui->textEditDescription->clear();
ui->pushButtonLoadView->setEnabled(false); ui->pushButtonLoadView->setEnabled(false);
ui->pushButtonDeleteView->setEnabled(false); ui->pushButtonDeleteView->setEnabled(false);
} }
void StoredViewDialog::loadView() void StoredViewDialog::loadView()
{ {
int idx = ui->listView->selectionModel()->currentIndex().row(); int idx = ui->listView->selectionModel()->currentIndex().row();
if(idx>=0) if(idx>=0)
{ {
mgr->setView(viewModel->getViewAtIdx(idx)); mgr->setView(viewModel->getViewAtIdx(idx), ui->useDateCheckB ox->isChecked());
} }
} }
void StoredViewDialog::deleteView() void StoredViewDialog::deleteView()
{ {
int idx = ui->listView->selectionModel()->currentIndex().row(); int idx = ui->listView->selectionModel()->currentIndex().row();
if(idx>=0) if(idx>=0)
{ {
viewModel->deleteView(idx); viewModel->deleteView(idx);
} }
} }
void StoredViewDialog::addUserView() void StoredViewDialog::addUserView()
{ {
StoredView sv = mgr->getCurrentView(); StoredView sv = mgr->getCurrentView();
sv.label = "New user view"; sv.label = "New user view";
if (ui->useDateCheckBox->isChecked())
{
StelCore *core=StelApp::getInstance().getCore();
sv.jd=core->getJD();
sv.jdIsRelevant=true;
}
SceneInfo info = viewModel->getScene(); SceneInfo info = viewModel->getScene();
sv.description = QString(q_("Grid coordinates (%1): %2m, %3m, %4m")) .arg(info.gridName) sv.description = QString(q_("Grid coordinates (%1): %2m, %3m, %4m")) .arg(info.gridName)
.arg(sv.position[0], 0, 'f', 2).arg(sv.position[1],0 ,'f',2).arg(sv.position[2],0,'f',2); .arg(sv.position[0], 0, 'f', 2).arg(sv.position[1],0 ,'f',2).arg(sv.position[2],0,'f',2);
QModelIndex idx = viewModel->addUserView(sv); QModelIndex idx = viewModel->addUserView(sv);
ui->listView->setCurrentIndex(idx); ui->listView->setCurrentIndex(idx);
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 8 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/