[Kst] branches/work/kst/portto4/kst/src/libkstapp
Peter Kümmel
syntheticpp at gmx.net
Thu Dec 3 10:01:28 CET 2009
What about moving UpdateManager::self()->setStore(_doc->objectStore());
into the constructor of Document? Then it can't be forgotten.
Peter
Barth Netterfield wrote:
> SVN commit 1057620 by netterfield:
>
> Fix crash.
>
> Loading kst files still has update troubles.
>
>
>
> M +6 -0 mainwindow.cpp
> M +1 -0 viewitemdialog.cpp
>
>
> --- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #1057619:1057620
> @@ -231,6 +231,8 @@
> bool MainWindow::initFromCommandLine() {
> delete _doc;
> _doc = new Document(this);
> + UpdateManager::self()->setStore(_doc->objectStore());
> +
> CommandLineParser P(_doc);
> bool ok = _doc->initFromCommandLine(&P);
> if (!P.pngFile().isEmpty()) {
> @@ -247,12 +249,16 @@
> void MainWindow::openFile(const QString &file) {
> delete _doc;
> _doc = new Document(this);
> + UpdateManager::self()->setStore(_doc->objectStore());
> +
> bool ok = _doc->open(file);
> if (!ok) {
> QMessageBox::critical(this, tr("Kst"), tr("Error opening document '%1':\n%2").arg(file, _doc->lastError()));
> delete _doc;
> _doc = new Document(this);
> + UpdateManager::self()->setStore(_doc->objectStore());
> } else {
> + UpdateManager::self()->doUpdates(true);
> _doc->setChanged(false);
> }
> }
> --- branches/work/kst/portto4/kst/src/libkstapp/viewitemdialog.cpp #1057619:1057620
> @@ -360,6 +360,7 @@
> } else {
> Q_ASSERT_X(false,"parent test", "item has no parentview item");
> parentWidth = parentHeight = 1.0;
> + parentX = parentY = 0.0;
> }
>
> qreal aspectRatio;
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
>
More information about the Kst
mailing list