distinguish global peak-reset button from meters:
[ardour.git] / gtk2_ardour / midi_list_editor.cc
index 53af17488c69fb2916cfee62237240e3c814e028..774c6fccf7da680c4c13f5a7b4988852ad3fc07b 100644 (file)
@@ -1,19 +1,19 @@
 /*
     Copyright (C) 2009 Paul Davis
 
-       This program is free software; you can redistribute it and/or modify
-       it under the terms of the GNU General Public License as published by
-       the Free Software Foundation; either version 2 of the License, or
-       (at your option) any later version.
-
-       This program is distributed in the hope that it will be useful,
-       but WITHOUT ANY WARRANTY; without even the implied warranty of
-       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-       GNU General Public License for more details.
-
-       You should have received a copy of the GNU General Public License
-       along with this program; if not, write to the Free Software
-       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+    
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+    
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
 #include <cmath>
@@ -180,8 +180,8 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
        TreeViewColumn* col;
        int cellx;
        int celly;
-       int idelta;
-       double fdelta;
+       int idelta = 0;
+       double fdelta = 0;
        MidiModel::NoteDiffCommand::Property prop (MidiModel::NoteDiffCommand::NoteNumber);
        bool apply = false;
        bool was_selected = false;
@@ -282,7 +282,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
 
                                previous_selection.push_back (*i);
 
-                               if (iter = model->get_iter (*i)) {
+                               if ((iter = model->get_iter (*i))) {
                                        
                                        note = (*iter)[columns._note];          
                                        
@@ -445,7 +445,6 @@ MidiListEditor::key_release (GdkEventKey* ev)
        TreeModel::Path path;
        TreeViewColumn* col;
        TreeModel::iterator iter;
-       TreeModel::Row row;
        MidiModel::NoteDiffCommand* cmd;
        boost::shared_ptr<MidiModel> m (region->midi_source(0)->model());
        boost::shared_ptr<NoteType> note;
@@ -586,8 +585,8 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
        double fval;
        int    ival;
        bool   apply = false;
-       int    idelta;
-       double fdelta;
+       int    idelta = 0;
+       double fdelta = 0;
        char*  opname;
        switch (edit_column) {
        case 0: // start
@@ -702,7 +701,7 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
                TreeView::Selection::ListHandle_Path rows = view.get_selection()->get_selected_rows ();
                
                for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
-                       if (iter = model->get_iter (*i)) {
+                       if ((iter = model->get_iter (*i))) {
 
                                note = (*iter)[columns._note];          
                                
@@ -809,7 +808,7 @@ MidiListEditor::selection_changed ()
        NotePlayer* player = new NotePlayer (track);
 
        for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
-               if (iter = model->get_iter (*i)) {
+               if ((iter = model->get_iter (*i))) {
                        note = (*iter)[columns._note];          
                        player->add (note);
                }