# HG changeset patch # User insilmaril # Date 1215779798 0 # Node ID 3368b54c79469c7c9e1e571301ff45287d241393 # Parent b8bb7beec2784dbb01ec320ddc2afdad3412f5b9 Fix for umlauts in paths diff -r b8bb7beec278 -r 3368b54c7946 mainwindow.cpp --- a/mainwindow.cpp Thu Jul 03 14:42:18 2008 +0000 +++ b/mainwindow.cpp Fri Jul 11 12:36:38 2008 +0000 @@ -79,6 +79,8 @@ { mainWindow=this; + setObjectName ("MainWindow"); + setCaption ("VYM - View Your Mind"); // Load window settings @@ -1702,11 +1704,11 @@ MapEditor *me; for (int i=0;i<=tabWidget->count() -1;i++) { - me=(MapEditor*)tabWidget->page(i); me->unselect(); } - currentMapEditor()->reselect(); + me=currentMapEditor(); + if (me) me->reselect(); // Update actions to in menus and toolbars according to editor updateActions(); @@ -1819,6 +1821,8 @@ // Check, if file exists (important for creating new files // from command line + /* + */ if (!QFile(fn).exists() ) { QMessageBox mb( vymName, @@ -1848,7 +1852,6 @@ } } - //tabWidget->currentPage() won't be NULL here, because of above... tabWidget->showPage(me); me->viewport()->setFocus(); @@ -2319,11 +2322,13 @@ return; } } - me->closeMap(); + //me->closeMap(); tabWidget->removePage(me); if (tabWidget->count()==0) actionFilePrint->setEnabled (false); - delete me; + + //delete me; + me->clear(); } } diff -r b8bb7beec278 -r 3368b54c7946 mapeditor.cpp --- a/mapeditor.cpp Thu Jul 03 14:42:18 2008 +0000 +++ b/mapeditor.cpp Fri Jul 11 12:36:38 2008 +0000 @@ -59,6 +59,8 @@ MapEditor::MapEditor( QWidget* parent) : QGraphicsView(parent) { + setObjectName ("MapEditor"); + //cout << "Constructor ME "<getOrientation()==LinkableMapObj::RightOfCenter) selectNextBranchInt(); else @@ -3099,6 +3102,7 @@ selectPrevBranchInt(); else selectNextBranchInt(); + } } diff -r b8bb7beec278 -r 3368b54c7946 options.cpp --- a/options.cpp Thu Jul 03 14:42:18 2008 +0000 +++ b/options.cpp Fri Jul 11 12:36:38 2008 +0000 @@ -47,13 +47,7 @@ int Options::parse() { - QStringList arglist; - int i=0; - while ( i < qApp->argc()) - { - arglist.append (qApp->argv()[i]); - i++; - } + QStringList arglist=qApp->arguments(); // Get program name progname=arglist.first(); @@ -61,6 +55,7 @@ // Work through rest of options bool isFile; + int i=0; for (i=0; i< arglist.size(); ++i) { isFile=true;