Vuo  2.1.0
VuoCommandSetNodeTitle.cc
Go to the documentation of this file.
1 
10 #include "VuoCommandCommon.hh"
12 #include "VuoEditorComposition.hh"
13 #include "VuoEditorWindow.hh"
14 
19  : VuoCommandCommon(window)
20 {
21  setText(QApplication::translate("VuoEditorWindow", "Set Node Title"));
22  this->window = window;
23  this->revertedSnapshot = window->getComposition()->takeSnapshot();
24 
25  // Start of command content.
26  {
27  node->getBase()->getRenderer()->setTitle(title);
28  }
29  // End of command content.
30 
31  this->updatedSnapshot = window->getComposition()->takeSnapshot();
32 
33  setDescription("Set node %s title to '%s'",
34  node->getIdentifier().c_str(),
35  title.c_str());
36 }
37 
42 {
44 }
45 
50 {
52 
53  window->resetCompositionWithSnapshot(revertedSnapshot);
55 }
56 
61 {
63 
64  window->resetCompositionWithSnapshot(updatedSnapshot);
66 }