/[svn]/gigedit/trunk/src/gigedit/CombineInstrumentsDialog.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/CombineInstrumentsDialog.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3450 by schoenebeck, Wed Jan 2 16:39:20 2019 UTC revision 3677 by schoenebeck, Thu Dec 26 23:01:09 2019 UTC
# Line 1  Line 1 
1  /*  /*
2      Copyright (c) 2014-2018 Christian Schoenebeck      Copyright (c) 2014-2019 Christian Schoenebeck
3            
4      This file is part of "gigedit" and released under the terms of the      This file is part of "gigedit" and released under the terms of the
5      GNU General Public License version 2.      GNU General Public License version 2.
# Line 1028  void CombineInstrumentsDialog::on_order_ Line 1028  void CombineInstrumentsDialog::on_order_
1028      const Gtk::SelectionData& selection_data, guint, guint time)      const Gtk::SelectionData& selection_data, guint, guint time)
1029  {  {
1030      printf("Drag data received\n");      printf("Drag data received\n");
     if (&selection_data == NULL) {  
         printf("!selection_data\n");  
         return;  
     }  
1031      if (!selection_data.get_data()) {      if (!selection_data.get_data()) {
1032          printf("selection_data.get_data() == NULL\n");          printf("selection_data.get_data() == NULL\n");
1033          return;          return;
# Line 1042  void CombineInstrumentsDialog::on_order_ Line 1038  void CombineInstrumentsDialog::on_order_
1038          printf("!src\n");          printf("!src\n");
1039          return;          return;
1040      }      }
1041      printf("src=%d\n", src);      printf("src=%ld\n", (size_t)src);
1042    
1043      gig::Instrument* dst = NULL;      gig::Instrument* dst = NULL;
1044      {      {
# Line 1196  void CombineInstrumentsDialog::onSelecti Line 1192  void CombineInstrumentsDialog::onSelecti
1192      {      {
1193          Children allOrdered = m_refOrderModel->children();          Children allOrdered = m_refOrderModel->children();
1194          for (Children::iterator itOrder = allOrdered.begin();          for (Children::iterator itOrder = allOrdered.begin();
1195               itOrder != allOrdered.end(); ++itOrder)               itOrder != allOrdered.end(); )
1196          {          {
1197              Gtk::TreeModel::Row rowOrder = *itOrder;              Gtk::TreeModel::Row rowOrder = *itOrder;
1198              gig::Instrument* instr = rowOrder[m_orderColumns.m_col_instr];              gig::Instrument* instr = rowOrder[m_orderColumns.m_col_instr];
# Line 1208  void CombineInstrumentsDialog::onSelecti Line 1204  void CombineInstrumentsDialog::onSelecti
1204              }              }
1205              goto removeOrderedItem;              goto removeOrderedItem;
1206          nextOrderedItem:          nextOrderedItem:
1207                ++itOrder;
1208              continue;              continue;
1209          removeOrderedItem:          removeOrderedItem:
1210              m_refOrderModel->erase(itOrder);              // postfix increment here to avoid iterator invalidation
1211                m_refOrderModel->erase(itOrder++);
1212          }          }
1213      }      }
1214    

Legend:
Removed from v.3450  
changed lines
  Added in v.3677

  ViewVC Help
Powered by ViewVC