Browse Source

Add names for a couple history actions.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
eb1048f6d0
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      src/app/ModuleWidget.cpp
  2. +1
    -0
      src/app/RackWidget.cpp

+ 1
- 1
src/app/ModuleWidget.cpp View File

@@ -766,6 +766,7 @@ void ModuleWidget::disconnectAction() {
void ModuleWidget::cloneAction() { void ModuleWidget::cloneAction() {
// history::ComplexAction // history::ComplexAction
history::ComplexAction* h = new history::ComplexAction; history::ComplexAction* h = new history::ComplexAction;
h->name = "duplicate module";


// JSON serialization is the obvious way to do this // JSON serialization is the obvious way to do this
json_t* moduleJ = toJson(); json_t* moduleJ = toJson();
@@ -789,7 +790,6 @@ void ModuleWidget::cloneAction() {


// history::ModuleAdd // history::ModuleAdd
history::ModuleAdd* hma = new history::ModuleAdd; history::ModuleAdd* hma = new history::ModuleAdd;
hma->name = "clone modules";
hma->setModule(clonedModuleWidget); hma->setModule(clonedModuleWidget);
h->push(hma); h->push(hma);




+ 1
- 0
src/app/RackWidget.cpp View File

@@ -760,6 +760,7 @@ void RackWidget::updateModuleOldPositions() {


history::ComplexAction* RackWidget::getModuleDragAction() { history::ComplexAction* RackWidget::getModuleDragAction() {
history::ComplexAction* h = new history::ComplexAction; history::ComplexAction* h = new history::ComplexAction;
h->name = "move modules";


for (ModuleWidget* mw : getModules()) { for (ModuleWidget* mw : getModules()) {
// Create ModuleMove action if the module was moved. // Create ModuleMove action if the module was moved.


Loading…
Cancel
Save