1.1 --- a/vymmodel.cpp Fri May 01 10:30:29 2009 +0000
1.2 +++ b/vymmodel.cpp Thu May 07 08:48:53 2009 +0000
1.3 @@ -2140,7 +2140,6 @@
1.4 parbi=selbi;
1.5 parix=index(parbi);
1.6 n=parbi->childCount();
1.7 - cout <<"n="<<n<<endl;
1.8 beginInsertRows (parix,n,n+1);
1.9 parbi->appendChild (newbi);
1.10 endInsertRows ();
1.11 @@ -2474,6 +2473,34 @@
1.12 emit (expandAll() );
1.13 }
1.14
1.15 +void VymModel::toggleStandardFlag (const QString &name)
1.16 +{
1.17 + cout << "VM::toggleStandardFlag "<<name.toStdString()<<endl;
1.18 + BranchItem *bi=getSelectedBranchItem();
1.19 + if (bi)
1.20 + {
1.21 + QString u,r;
1.22 + if (bi->isActiveStandardFlag(name))
1.23 + {
1.24 + r="unsetFlag";
1.25 + u="setFlag";
1.26 + }
1.27 + else
1.28 + {
1.29 + u="unsetFlag";
1.30 + r="setFlag";
1.31 + }
1.32 + saveState(
1.33 + bi,
1.34 + QString("%1 (\"%2\")").arg(u).arg(name),
1.35 + bi,
1.36 + QString("%1 (\"%2\")").arg(r).arg(name),
1.37 + QString("Toggling standard flag \"%1\" of %2").arg(name).arg(getObjectName(bi)));
1.38 + bi->toggleStandardFlag (name); //FIXME-0,mainWindow->useFlagGroups());
1.39 + //FIXME-0 model->updateSelection(); // geometry has changed
1.40 + }
1.41 +}
1.42 +
1.43 void VymModel::addFloatImage (const QPixmap &img) //FIXME-2
1.44 {
1.45 /*
1.46 @@ -4858,7 +4885,6 @@
1.47 // left of center
1.48 if (type == TreeItem::Branch )
1.49 {
1.50 - cout << "VM::selLeft\n";
1.51 selectLastSelectedBranch();
1.52 return;
1.53 }
1.54 @@ -4899,7 +4925,6 @@
1.55 if (type == TreeItem::Branch ||
1.56 type == TreeItem::Image)
1.57 {
1.58 - cout << "VM::selRight\n";
1.59 QModelIndex ix=index(selbi->parent());
1.60 selModel->select (ix,QItemSelectionModel::ClearAndSelect );
1.61 }