diff -r 1b4d1ea6ea8c -r 54d44ecd6097 vymview.cpp --- a/vymview.cpp Fri Mar 06 15:02:58 2009 +0000 +++ b/vymview.cpp Thu Mar 19 11:45:28 2009 +0000 @@ -1,6 +1,7 @@ #include "vymview.h" #include +using namespace std; #include "mainwindow.h" #include "mapeditor.h" @@ -8,8 +9,10 @@ extern Main *mainWindow; -VymView::VymView(VymModel *model) +VymView::VymView(VymModel *m) { + model=m; + // Create TreeView treeview=new QTreeView; treeview->setModel ((QAbstractItemModel*)model); @@ -61,11 +64,28 @@ } -void VymView::changeSelection (const QItemSelection &newSel, const QItemSelection &delSel) +void VymView::changeSelection (const QItemSelection &, const QItemSelection &) { - // FIXME Currently this works only from treeview->ME - treeview->expandAll(); //FIXME only for testing + cout << "VymView::changeSelection (newsel,delsel)\n"; + //treeview->expandAll(); //FIXME only for testing //((VymModel*)treeview->model())->select (); + + // Show URL and link in statusbar + QString status; + QString s=model->getURL(); + if (!s.isEmpty() ) status+="URL: "+s+" "; + s=model->getVymLink(); + if (!s.isEmpty() ) status+="Link: "+s; + if (!status.isEmpty() ) mainWindow->statusMessage (status); + +/* FIXME, was so far in BranchObj + // Update Toolbar + //updateFlagsToolbar(); + +*/ + + // Update actions + mainWindow->updateActions(); }