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

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

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

revision 3196 by schoenebeck, Mon May 8 18:05:35 2017 UTC revision 3197 by schoenebeck, Sat May 20 17:15:36 2017 UTC
# Line 1  Line 1 
1  /*  /*
2      Copyright (c) 2014 Christian Schoenebeck      Copyright (c) 2014 - 2017 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 111  void ScriptSlots::onScriptDragNDropDataR Line 111  void ScriptSlots::onScriptDragNDropDataR
111          appendNewSlot(script);          appendNewSlot(script);
112          // drop success          // drop success
113          context->drop_reply(true, time);          context->drop_reply(true, time);
114            // inform i.e. main window
115            script_slots_changed_signal.emit(m_instrument);
116      } else {      } else {
117          // drop failed          // drop failed
118          context->drop_reply(false, time);          context->drop_reply(false, time);
# Line 165  void ScriptSlots::moveSlotUp(int slotID) Line 167  void ScriptSlots::moveSlotUp(int slotID)
167              if (i != 0) {              if (i != 0) {
168                  m_instrument->SwapScriptSlots(i, i-1);                  m_instrument->SwapScriptSlots(i, i-1);
169                  refreshSlots();                  refreshSlots();
170                    script_slots_changed_signal.emit(m_instrument);
171              }              }
172              break;              break;
173          }          }
# Line 177  void ScriptSlots::moveSlotDown(int slotI Line 180  void ScriptSlots::moveSlotDown(int slotI
180              if (i < m_instrument->ScriptSlotCount() - 1) {              if (i < m_instrument->ScriptSlotCount() - 1) {
181                  m_instrument->SwapScriptSlots(i, i+1);                  m_instrument->SwapScriptSlots(i, i+1);
182                  refreshSlots();                  refreshSlots();
183                    script_slots_changed_signal.emit(m_instrument);
184              }              }
185              break;              break;
186          }          }
# Line 188  void ScriptSlots::deleteSlot(int slotID) Line 192  void ScriptSlots::deleteSlot(int slotID)
192          if (m_slots[i].id == slotID) {          if (m_slots[i].id == slotID) {
193              m_instrument->RemoveScriptSlot(i);              m_instrument->RemoveScriptSlot(i);
194              refreshSlots();              refreshSlots();
195                script_slots_changed_signal.emit(m_instrument);
196              break;              break;
197          }          }
198      }      }
199  }  }
200    
201    sigc::signal<void, gig::Instrument*>& ScriptSlots::signal_script_slots_changed() {
202        return script_slots_changed_signal;
203    }
204    
205  void ScriptSlots::onButtonClose() {  void ScriptSlots::onButtonClose() {
206      hide();      hide();
207  }  }

Legend:
Removed from v.3196  
changed lines
  Added in v.3197

  ViewVC Help
Powered by ViewVC