Fix for umlauts in paths
authorinsilmaril
Fri Jul 11 12:36:38 2008 +0000 (2008-07-11)
changeset 7143368b54c7946
parent 713 b8bb7beec278
child 715 c7f2d53c98d1
Fix for umlauts in paths
mainwindow.cpp
mapeditor.cpp
options.cpp
     1.1 --- a/mainwindow.cpp	Thu Jul 03 14:42:18 2008 +0000
     1.2 +++ b/mainwindow.cpp	Fri Jul 11 12:36:38 2008 +0000
     1.3 @@ -79,6 +79,8 @@
     1.4  {
     1.5  	mainWindow=this;
     1.6  
     1.7 +	setObjectName ("MainWindow");
     1.8 +
     1.9  	setCaption ("VYM - View Your Mind");
    1.10  
    1.11  	// Load window settings
    1.12 @@ -1702,11 +1704,11 @@
    1.13  	MapEditor *me;
    1.14  	for (int i=0;i<=tabWidget->count() -1;i++)
    1.15  	{
    1.16 -		
    1.17  		me=(MapEditor*)tabWidget->page(i);
    1.18  		me->unselect();
    1.19  	}	
    1.20 -	currentMapEditor()->reselect();
    1.21 +	me=currentMapEditor();
    1.22 +	if (me) me->reselect();
    1.23  
    1.24  	// Update actions to in menus and toolbars according to editor
    1.25  	updateActions();
    1.26 @@ -1819,6 +1821,8 @@
    1.27  		
    1.28  		// Check, if file exists (important for creating new files
    1.29  		// from command line
    1.30 +		/*
    1.31 +		*/
    1.32  		if (!QFile(fn).exists() )
    1.33  		{
    1.34  			QMessageBox mb( vymName,
    1.35 @@ -1848,7 +1852,6 @@
    1.36  			}
    1.37  		}	
    1.38  
    1.39 -
    1.40  		//tabWidget->currentPage() won't be NULL here, because of above...
    1.41  		tabWidget->showPage(me);
    1.42  		me->viewport()->setFocus();
    1.43 @@ -2319,11 +2322,13 @@
    1.44  				return;
    1.45  			}
    1.46  		} 
    1.47 -		me->closeMap();
    1.48 +		//me->closeMap(); 
    1.49  		tabWidget->removePage(me);
    1.50  		if (tabWidget->count()==0)
    1.51  			actionFilePrint->setEnabled (false);
    1.52 -        delete me;
    1.53 +
    1.54 +        //delete me;
    1.55 +		me->clear();
    1.56  	}
    1.57  }
    1.58  
     2.1 --- a/mapeditor.cpp	Thu Jul 03 14:42:18 2008 +0000
     2.2 +++ b/mapeditor.cpp	Fri Jul 11 12:36:38 2008 +0000
     2.3 @@ -59,6 +59,8 @@
     2.4  MapEditor::MapEditor( QWidget* parent) :
     2.5    QGraphicsView(parent)  
     2.6  {
     2.7 +	setObjectName ("MapEditor");
     2.8 +
     2.9  	//cout << "Constructor ME "<<this<<endl;
    2.10  	mapNum++;
    2.11  
    2.12 @@ -1500,7 +1502,7 @@
    2.13  	updateActions();
    2.14  
    2.15      clear();
    2.16 -	close();
    2.17 +	// close();  FIXME needed?
    2.18  }
    2.19  
    2.20  void MapEditor::setFilePath(QString fpath, QString destname)
    2.21 @@ -3092,6 +3094,7 @@
    2.22  
    2.23  	BranchObj *bo=xelection.getBranch();
    2.24  	if (bo && xelection.type()==Selection::Branch)
    2.25 +	{
    2.26  		if (bo->getOrientation()==LinkableMapObj::RightOfCenter)
    2.27  			selectNextBranchInt();
    2.28  		else
    2.29 @@ -3099,6 +3102,7 @@
    2.30  				selectPrevBranchInt();
    2.31  			else
    2.32  				selectNextBranchInt();
    2.33 +	}			
    2.34  }
    2.35  
    2.36  
     3.1 --- a/options.cpp	Thu Jul 03 14:42:18 2008 +0000
     3.2 +++ b/options.cpp	Fri Jul 11 12:36:38 2008 +0000
     3.3 @@ -47,13 +47,7 @@
     3.4  
     3.5  int Options::parse()
     3.6  {
     3.7 -	QStringList arglist;
     3.8 -	int i=0;
     3.9 -	while ( i < qApp->argc())
    3.10 -	{	
    3.11 -		arglist.append (qApp->argv()[i]);
    3.12 -		i++;
    3.13 -	}
    3.14 +	QStringList arglist=qApp->arguments();
    3.15  
    3.16  	// Get program name
    3.17  	progname=arglist.first();
    3.18 @@ -61,6 +55,7 @@
    3.19  
    3.20  	// Work through rest of options
    3.21  	bool isFile;
    3.22 +	int i=0;
    3.23  	for (i=0; i< arglist.size(); ++i)
    3.24  	{
    3.25  		isFile=true;