Re-added support for Bugzilla URL and fixed missing autocolor of new branch
authorinsilmaril
Fri, 02 Oct 2009 14:31:03 +0000
changeset 803338ebdc9b947
parent 802 f076fdec767d
child 804 14f2b1b15242
Re-added support for Bugzilla URL and fixed missing autocolor of new branch
mainwindow.cpp
vymmodel.cpp
vymview.cpp
     1.1 --- a/mainwindow.cpp	Fri Oct 02 13:24:55 2009 +0000
     1.2 +++ b/mainwindow.cpp	Fri Oct 02 14:31:03 2009 +0000
     1.3 @@ -772,6 +772,10 @@
     1.4  	a->setStatusTip ( tr( "Create URL to Novell Bugzilla" ));
     1.5  	a->setEnabled (false);
     1.6  	actionListBranches.append(a);
     1.7 +	a->setShortcut ( Qt::Key_B );
     1.8 +	a->setShortcutContext (Qt::WindowShortcut);
     1.9 +	addAction(a);
    1.10 +
    1.11      connect( a, SIGNAL( triggered() ), this, SLOT( editBugzilla2URL() ) );
    1.12  	actionBugzilla2URL=a;
    1.13      
    1.14 @@ -2816,7 +2820,6 @@
    1.15  			|| actionSettingsAutoEditNewBranch->isOn()) 
    1.16  		{
    1.17  			m->select (bi);
    1.18 -			cout << "Main::editNewBranch  prevSel="<<prevSelection.toStdString()<<endl;
    1.19  			if (actionSettingsAutoEditNewBranch->isOn())
    1.20  				currentMapEditor()->editHeading();
    1.21  		}
     2.1 --- a/vymmodel.cpp	Fri Oct 02 13:24:55 2009 +0000
     2.2 +++ b/vymmodel.cpp	Fri Oct 02 14:31:03 2009 +0000
     2.3 @@ -2167,13 +2167,13 @@
     2.4  
     2.5  	// Create TreeItem
     2.6  	QList<QVariant> cData;
     2.7 -	cData << "new" << "undef";
     2.8 +	cData << "" << "undef";
     2.9  
    2.10  	BranchItem *parbi;
    2.11  	QModelIndex parix;
    2.12  	int n;
    2.13  	BranchItem *newbi=new BranchItem (cData);	
    2.14 -	newbi->setHeading (QApplication::translate("Heading of new branch in map", "new"));
    2.15 +	//newbi->setHeading (QApplication::translate("Heading of new branch in map", "new"));
    2.16  
    2.17  	emit (layoutAboutToBeChanged() );
    2.18  
    2.19 @@ -2198,6 +2198,9 @@
    2.20  	}
    2.21  	emit (layoutChanged() );
    2.22  
    2.23 +	// Set color of heading to that of parent
    2.24 +	newbi->setHeadingColor (parbi->getHeadingColor());
    2.25 +
    2.26  	// save scroll state. If scrolled, automatically select
    2.27  	// new branch in order to tmp unscroll parent...
    2.28  	newbi->createMapObj(mapScene);
    2.29 @@ -2774,8 +2777,10 @@
    2.30  	TreeItem *selti=getSelectedItem();
    2.31  	if (selti)
    2.32  	{		
    2.33 -		QString url= "https://bugzilla.novell.com/show_bug.cgi?id="+selti->getHeading();
    2.34 -		setURL (url);
    2.35 +		QString h=selti->getHeading();
    2.36 +		QRegExp rx("^(\\d+)");
    2.37 +		if (rx.indexIn(h) !=-1)
    2.38 +			setURL ("https://bugzilla.novell.com/show_bug.cgi?id="+rx.cap(1) );
    2.39  	}
    2.40  }	
    2.41  
     3.1 --- a/vymview.cpp	Fri Oct 02 13:24:55 2009 +0000
     3.2 +++ b/vymview.cpp	Fri Oct 02 14:31:03 2009 +0000
     3.3 @@ -126,7 +126,7 @@
     3.4  	// Re-emit but map selection first
     3.5  	selModel->select (treeEditor->getProxyModel()->mapSelectionToSource (newsel),
     3.6  		QItemSelectionModel::ClearAndSelect );
     3.7 -	//showSelection();
     3.8 +	showSelection();
     3.9  }
    3.10  
    3.11  void VymView::expandAll()