1.1 --- a/mainwindow.cpp Thu Apr 30 11:52:49 2009 +0000
1.2 +++ b/mainwindow.cpp Fri May 01 10:30:29 2009 +0000
1.3 @@ -689,11 +689,6 @@
1.4 editMenu->addAction (a);
1.5 actionSortChildren=a;
1.6
1.7 - a = new QAction( QPixmap(flagsPath+"flag-scrolled-right.png"), tr( "Scroll branch","Edit menu" ),this);
1.8 - a->setShortcut ( Qt::Key_ScrollLock );
1.9 - a->setStatusTip (tr( "Scroll branch" ) );
1.10 - connect( a, SIGNAL( triggered() ), this, SLOT( editToggleScroll() ) );
1.11 -
1.12 alt = new QAction( QPixmap(flagsPath+"flag-scrolled-right.png"), tr( "Scroll branch","Edit menu" ), this);
1.13 alt->setShortcut ( Qt::Key_S ); // Scroll branch
1.14 alt->setStatusTip (tr( "Scroll branch" ));
1.15 @@ -712,6 +707,19 @@
1.16 addAction (alt);
1.17 actionListBranches.append(actionToggleScroll);
1.18
1.19 + a = new QAction( QPixmap(), tr( "Expand all branches","Edit menu" ), this);
1.20 + a->setShortcut ( Qt::SHIFT + Qt::Key_X ); // Expand all branches
1.21 + a->setStatusTip (tr( "Expand all branches" ));
1.22 + connect( a, SIGNAL( triggered() ), this, SLOT( editExpandAll() ) );
1.23 + actionExpandAll=a;
1.24 + actionExpandAll->setEnabled (false);
1.25 + actionExpandAll->setToggleAction(false);
1.26 + //tb->addAction (actionExpandAll);
1.27 + editMenu->addAction ( actionExpandAll);
1.28 + addAction (a);
1.29 + actionListBranches.append(actionExpandAll);
1.30 +
1.31 +
1.32 a = new QAction( tr( "Unscroll children","Edit menu" ), this);
1.33 a->setStatusTip (tr( "Unscroll all scrolled branches in selected subtree" ));
1.34 editMenu->addAction (a);
1.35 @@ -1773,7 +1781,6 @@
1.36 VymView *Main::createView (VymModel *model)
1.37 {
1.38 VymView *vm=new VymView (model);
1.39 -
1.40 return vm;
1.41 }
1.42
1.43 @@ -1784,8 +1791,7 @@
1.44 //MapEditor* me = new MapEditor (m);
1.45 //me->setObjectName ("MapEditor");
1.46
1.47 - VymView *view=createView (m);
1.48 - tabWidget->addTab (view,tr("unnamed","MainWindow: name for new and empty file"));
1.49 + tabWidget->addTab (createView (m),tr("unnamed","MainWindow: name for new and empty file"));
1.50 tabWidget->setCurrentIndex (tabModel.count() );
1.51
1.52 // For the very first map we do not have flagrows yet...
1.53 @@ -1867,8 +1873,7 @@
1.54 {
1.55 vm=new VymModel;
1.56 tabModel.append (vm);
1.57 - VymView *view=createView (vm);
1.58 - tabWidget->addTab (view,fn);
1.59 + tabWidget->addTab (createView (vm),fn);
1.60 tabIndex=tabWidget->count()-1;
1.61 tabWidget->setCurrentPage (tabIndex);
1.62 }
1.63 @@ -2928,6 +2933,12 @@
1.64 if (m) m->toggleScroll();
1.65 }
1.66
1.67 +void Main::editExpandAll()
1.68 +{
1.69 + VymModel *m=currentModel();
1.70 + if (m) m->emitExpandAll();
1.71 +}
1.72 +
1.73 void Main::editUnscrollChildren()
1.74 {
1.75 VymModel *m=currentModel();
1.76 @@ -2995,7 +3006,7 @@
1.77 VymModel *m=currentModel();
1.78 if ( m)
1.79 {
1.80 - BranchItem *bi=m->createBranch(); //FIXME-1 missing: m->addNewBranch (-1);
1.81 + BranchItem *bi=m->addNewBranch (-1);
1.82
1.83
1.84 if (bi)
1.85 @@ -3017,7 +3028,7 @@
1.86 VymModel *m=currentModel();
1.87 if (m)
1.88 {
1.89 - BranchItem *bi=m->createBranch();//FIXME-1 *newbo=m->addNewBranch (1);
1.90 + BranchItem *bi=m->addNewBranch (1);
1.91
1.92 if (bi)
1.93 m->select (bi);
1.94 @@ -3286,7 +3297,7 @@
1.95 void Main::viewCenter()
1.96 {
1.97 VymModel *m=currentModel();
1.98 - if (m) m->ensureSelectionVisible();
1.99 + if (m) m->emitShowSelection();
1.100 }
1.101
1.102 void Main::networkStartServer()