# HG changeset patch
# User insilmaril
# Date 1254493863 0
# Node ID 338ebdc9b94706301c9835b318f8b590c6bde9bb
# Parent  f076fdec767d0b48ab4e5b1abd0a529d72426c6f
Re-added support for Bugzilla URL and fixed missing autocolor of new branch

diff -r f076fdec767d -r 338ebdc9b947 mainwindow.cpp
--- a/mainwindow.cpp	Fri Oct 02 13:24:55 2009 +0000
+++ b/mainwindow.cpp	Fri Oct 02 14:31:03 2009 +0000
@@ -772,6 +772,10 @@
 	a->setStatusTip ( tr( "Create URL to Novell Bugzilla" ));
 	a->setEnabled (false);
 	actionListBranches.append(a);
+	a->setShortcut ( Qt::Key_B );
+	a->setShortcutContext (Qt::WindowShortcut);
+	addAction(a);
+
     connect( a, SIGNAL( triggered() ), this, SLOT( editBugzilla2URL() ) );
 	actionBugzilla2URL=a;
     
@@ -2816,7 +2820,6 @@
 			|| actionSettingsAutoEditNewBranch->isOn()) 
 		{
 			m->select (bi);
-			cout << "Main::editNewBranch  prevSel="<<prevSelection.toStdString()<<endl;
 			if (actionSettingsAutoEditNewBranch->isOn())
 				currentMapEditor()->editHeading();
 		}
diff -r f076fdec767d -r 338ebdc9b947 vymmodel.cpp
--- a/vymmodel.cpp	Fri Oct 02 13:24:55 2009 +0000
+++ b/vymmodel.cpp	Fri Oct 02 14:31:03 2009 +0000
@@ -2167,13 +2167,13 @@
 
 	// Create TreeItem
 	QList<QVariant> cData;
-	cData << "new" << "undef";
+	cData << "" << "undef";
 
 	BranchItem *parbi;
 	QModelIndex parix;
 	int n;
 	BranchItem *newbi=new BranchItem (cData);	
-	newbi->setHeading (QApplication::translate("Heading of new branch in map", "new"));
+	//newbi->setHeading (QApplication::translate("Heading of new branch in map", "new"));
 
 	emit (layoutAboutToBeChanged() );
 
@@ -2198,6 +2198,9 @@
 	}
 	emit (layoutChanged() );
 
+	// Set color of heading to that of parent
+	newbi->setHeadingColor (parbi->getHeadingColor());
+
 	// save scroll state. If scrolled, automatically select
 	// new branch in order to tmp unscroll parent...
 	newbi->createMapObj(mapScene);
@@ -2774,8 +2777,10 @@
 	TreeItem *selti=getSelectedItem();
 	if (selti)
 	{		
-		QString url= "https://bugzilla.novell.com/show_bug.cgi?id="+selti->getHeading();
-		setURL (url);
+		QString h=selti->getHeading();
+		QRegExp rx("^(\\d+)");
+		if (rx.indexIn(h) !=-1)
+			setURL ("https://bugzilla.novell.com/show_bug.cgi?id="+rx.cap(1) );
 	}
 }	
 
diff -r f076fdec767d -r 338ebdc9b947 vymview.cpp
--- a/vymview.cpp	Fri Oct 02 13:24:55 2009 +0000
+++ b/vymview.cpp	Fri Oct 02 14:31:03 2009 +0000
@@ -126,7 +126,7 @@
 	// Re-emit but map selection first
 	selModel->select (treeEditor->getProxyModel()->mapSelectionToSource (newsel),
 		QItemSelectionModel::ClearAndSelect );
-	//showSelection();
+	showSelection();
 }
 
 void VymView::expandAll()