~ubuntu-branches/ubuntu/trusty/muse/trusty

« back to all changes in this revision

Viewing changes to muse/midieditor.cpp

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2013-08-28 16:25:57 UTC
  • mto: This revision was merged to the branch mainline in revision 27.
  • Revision ID: package-import@ubuntu.com-20130828162557-knls3ip7j262eepx
Tags: upstream-2.1.2
ImportĀ upstreamĀ versionĀ 2.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
    canvas->setCurrentPart(part); 
246
246
}
247
247
 
248
 
void MidiEditor::horizontalZoom(bool zoom_in, int pos_offset)
249
 
{
250
 
  int mag = hscroll->mag();
251
 
  int zoomlvl = MusEGui::ScrollScale::getQuickZoomLevel(mag);
252
 
  if(zoom_in)
253
 
  {
254
 
    if (zoomlvl < MusEGui::ScrollScale::zoomLevels-1)
255
 
        zoomlvl++;
256
 
  }
257
 
  else
258
 
  {
259
 
    if (zoomlvl > 1)
260
 
        zoomlvl--;
261
 
  }
262
 
  int newmag = MusEGui::ScrollScale::convertQuickZoomLevelToMag(zoomlvl);
263
 
  hscroll->setMag(newmag, pos_offset);
264
 
}
265
 
 
266
248
void MidiEditor::addNewParts(const std::map< MusECore::Part*, std::set<MusECore::Part*> >& param)
267
249
{
268
250
  using std::map;