Merge branch 'master' of https://github.com/olive-editor/olive
@@ -60,6 +60,7 @@ QIcon icon::Sequence;
|
|||||||
QIcon icon::Video;
|
QIcon icon::Video;
|
||||||
QIcon icon::Audio;
|
QIcon icon::Audio;
|
||||||
QIcon icon::Image;
|
QIcon icon::Image;
|
||||||
|
QIcon icon::MiniMap;
|
||||||
QIcon icon::TriUp;
|
QIcon icon::TriUp;
|
||||||
QIcon icon::TriLeft;
|
QIcon icon::TriLeft;
|
||||||
QIcon icon::TriDown;
|
QIcon icon::TriDown;
|
||||||
@@ -110,6 +111,8 @@ void icon::LoadAll(const QString& theme)
|
|||||||
Audio = Create(theme, "audiosource");
|
Audio = Create(theme, "audiosource");
|
||||||
Image = Create(theme, "imagesource");
|
Image = Create(theme, "imagesource");
|
||||||
|
|
||||||
|
MiniMap = Create(theme, "map");
|
||||||
|
|
||||||
TriUp = Create(theme, "tri-up");
|
TriUp = Create(theme, "tri-up");
|
||||||
TriLeft = Create(theme, "tri-left");
|
TriLeft = Create(theme, "tri-left");
|
||||||
TriDown = Create(theme, "tri-down");
|
TriDown = Create(theme, "tri-down");
|
||||||
|
|||||||
@@ -65,6 +65,9 @@ extern QIcon Video;
|
|||||||
extern QIcon Audio;
|
extern QIcon Audio;
|
||||||
extern QIcon Image;
|
extern QIcon Image;
|
||||||
|
|
||||||
|
// Node Icons
|
||||||
|
extern QIcon MiniMap;
|
||||||
|
|
||||||
// Triangle Arrows
|
// Triangle Arrows
|
||||||
extern QIcon TriUp;
|
extern QIcon TriUp;
|
||||||
extern QIcon TriLeft;
|
extern QIcon TriLeft;
|
||||||
|
|||||||
@@ -110,6 +110,10 @@
|
|||||||
<file>png/magnet.32.png</file>
|
<file>png/magnet.32.png</file>
|
||||||
<file>png/magnet.64.png</file>
|
<file>png/magnet.64.png</file>
|
||||||
<file>png/magnet.128.png</file>
|
<file>png/magnet.128.png</file>
|
||||||
|
<file>png/map.16.png</file>
|
||||||
|
<file>png/map.32.png</file>
|
||||||
|
<file>png/map.64.png</file>
|
||||||
|
<file>png/map.128.png</file>
|
||||||
<file>png/minus.16.png</file>
|
<file>png/minus.16.png</file>
|
||||||
<file>png/minus.32.png</file>
|
<file>png/minus.32.png</file>
|
||||||
<file>png/minus.64.png</file>
|
<file>png/minus.64.png</file>
|
||||||
|
|||||||
|
After Width: | Height: | Size: 934 B |
|
After Width: | Height: | Size: 356 B |
|
After Width: | Height: | Size: 417 B |
|
After Width: | Height: | Size: 569 B |
@@ -0,0 +1,155 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
sodipodi:docname="map5.svg"
|
||||||
|
inkscape:version="1.2-dev (217ad3d, 2021-07-13)"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
id="svg2"
|
||||||
|
height="64"
|
||||||
|
width="64"
|
||||||
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 64 64"
|
||||||
|
inkscape:export-filename="/Users/pablo/olive_pablo/icons/iconview.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<defs
|
||||||
|
id="defs14" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
stroke="#3465a4"
|
||||||
|
inkscape:window-y="23"
|
||||||
|
inkscape:window-x="47"
|
||||||
|
inkscape:window-height="927"
|
||||||
|
inkscape:window-width="1633"
|
||||||
|
inkscape:showpageshadow="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
inkscape:cy="32"
|
||||||
|
inkscape:cx="31.957503"
|
||||||
|
inkscape:zoom="11.765625"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
borderopacity="1"
|
||||||
|
bordercolor="#989898"
|
||||||
|
pagecolor="#000000"
|
||||||
|
id="base"
|
||||||
|
fill="#729fcf"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
borderlayer="true"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:snap-bbox-midpoints="false"
|
||||||
|
inkscape:bbox-nodes="true"
|
||||||
|
inkscape:snap-nodes="true"
|
||||||
|
inkscape:snap-smooth-nodes="true"
|
||||||
|
inkscape:document-rotation="0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:guide-bbox="true"
|
||||||
|
inkscape:lockguides="true"
|
||||||
|
guidecolor="#ff0000"
|
||||||
|
guideopacity="0.30196078">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid_pixels"
|
||||||
|
color="#ffffff"
|
||||||
|
opacity="0.05098039"
|
||||||
|
empcolor="#ffffff"
|
||||||
|
empopacity="0.10196078"
|
||||||
|
dotted="false"
|
||||||
|
empspacing="8"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
visible="true"
|
||||||
|
snapvisiblegridlinesonly="true"
|
||||||
|
enabled="true" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="2,64"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide6912"
|
||||||
|
inkscape:locked="true" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="62,64"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide6914"
|
||||||
|
inkscape:locked="true" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="0,62"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide6916"
|
||||||
|
inkscape:locked="true" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="0,2"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide6918"
|
||||||
|
inkscape:locked="true" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="32,32"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide6920"
|
||||||
|
inkscape:locked="true" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="32,32"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide6922"
|
||||||
|
inkscape:locked="true" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata4">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:creator>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>Martin Ruskov</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:creator>
|
||||||
|
<dc:source>http://commons.wikimedia.org/wiki/Tango_icon</dc:source>
|
||||||
|
<cc:license
|
||||||
|
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
|
||||||
|
</cc:Work>
|
||||||
|
<cc:License
|
||||||
|
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://web.resource.org/cc/Reproduction" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://web.resource.org/cc/Distribution" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://web.resource.org/cc/Notice" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://web.resource.org/cc/Attribution" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://web.resource.org/cc/ShareAlike" />
|
||||||
|
</cc:License>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
inkscape:label="Design"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,16)">
|
||||||
|
<path
|
||||||
|
style="font-variation-settings:normal;vector-effect:none;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.86;stop-color:#ffffff"
|
||||||
|
d="M 5,37 V -5 h 54 v 42 z"
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
id="path4087" />
|
||||||
|
<path
|
||||||
|
style="color:#ffffff;fill:#ffffff;fill-opacity:0.48;stroke-linecap:round;stroke-linejoin:round;-inkscape-stroke:none"
|
||||||
|
d="m 32,13 c -1.656786,1.66e-4 -2.999834,1.343214 -3,3 v 11 c 1.66e-4,1.656786 1.343214,2.999834 3,3 h 17 c 1.656786,-1.66e-4 2.999834,-1.343214 3,-3 V 16 c -1.66e-4,-1.656786 -1.343214,-2.999834 -3,-3 z"
|
||||||
|
id="path1776"
|
||||||
|
sodipodi:nodetypes="ccccccccc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.0 KiB |
@@ -110,6 +110,10 @@
|
|||||||
<file>png/magnet.32.png</file>
|
<file>png/magnet.32.png</file>
|
||||||
<file>png/magnet.64.png</file>
|
<file>png/magnet.64.png</file>
|
||||||
<file>png/magnet.128.png</file>
|
<file>png/magnet.128.png</file>
|
||||||
|
<file>png/map.16.png</file>
|
||||||
|
<file>png/map.32.png</file>
|
||||||
|
<file>png/map.64.png</file>
|
||||||
|
<file>png/map.128.png</file>
|
||||||
<file>png/minus.16.png</file>
|
<file>png/minus.16.png</file>
|
||||||
<file>png/minus.32.png</file>
|
<file>png/minus.32.png</file>
|
||||||
<file>png/minus.64.png</file>
|
<file>png/minus.64.png</file>
|
||||||
|
|||||||
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 384 B |
|
After Width: | Height: | Size: 460 B |
|
After Width: | Height: | Size: 629 B |
@@ -0,0 +1,155 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
sodipodi:docname="map5.svg"
|
||||||
|
inkscape:version="1.2-dev (217ad3d, 2021-07-13)"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
id="svg2"
|
||||||
|
height="64"
|
||||||
|
width="64"
|
||||||
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 64 64"
|
||||||
|
inkscape:export-filename="/Users/pablo/olive_pablo/icons/iconview.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<defs
|
||||||
|
id="defs14" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
stroke="#3465a4"
|
||||||
|
inkscape:window-y="23"
|
||||||
|
inkscape:window-x="47"
|
||||||
|
inkscape:window-height="927"
|
||||||
|
inkscape:window-width="1633"
|
||||||
|
inkscape:showpageshadow="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
inkscape:cy="32"
|
||||||
|
inkscape:cx="31.957503"
|
||||||
|
inkscape:zoom="11.765625"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
borderopacity="1"
|
||||||
|
bordercolor="#202020"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
id="base"
|
||||||
|
fill="#729fcf"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
borderlayer="true"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:snap-bbox-midpoints="false"
|
||||||
|
inkscape:bbox-nodes="true"
|
||||||
|
inkscape:snap-nodes="true"
|
||||||
|
inkscape:snap-smooth-nodes="true"
|
||||||
|
inkscape:document-rotation="0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:guide-bbox="true"
|
||||||
|
inkscape:lockguides="true"
|
||||||
|
guidecolor="#ff0000"
|
||||||
|
guideopacity="0.30196078">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid_pixels"
|
||||||
|
color="#000000"
|
||||||
|
opacity="0.05098039"
|
||||||
|
empcolor="#000000"
|
||||||
|
empopacity="0.10196078"
|
||||||
|
dotted="false"
|
||||||
|
empspacing="8"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
visible="true"
|
||||||
|
snapvisiblegridlinesonly="true"
|
||||||
|
enabled="true" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="2,64"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide6912"
|
||||||
|
inkscape:locked="true" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="62,64"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide6914"
|
||||||
|
inkscape:locked="true" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="0,62"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide6916"
|
||||||
|
inkscape:locked="true" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="0,2"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide6918"
|
||||||
|
inkscape:locked="true" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="32,32"
|
||||||
|
orientation="0,-1"
|
||||||
|
id="guide6920"
|
||||||
|
inkscape:locked="true" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="32,32"
|
||||||
|
orientation="1,0"
|
||||||
|
id="guide6922"
|
||||||
|
inkscape:locked="true" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata4">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:creator>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>Martin Ruskov</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:creator>
|
||||||
|
<dc:source>http://commons.wikimedia.org/wiki/Tango_icon</dc:source>
|
||||||
|
<cc:license
|
||||||
|
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
|
||||||
|
</cc:Work>
|
||||||
|
<cc:License
|
||||||
|
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://web.resource.org/cc/Reproduction" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://web.resource.org/cc/Distribution" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://web.resource.org/cc/Notice" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://web.resource.org/cc/Attribution" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://web.resource.org/cc/ShareAlike" />
|
||||||
|
</cc:License>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
inkscape:label="Design"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,16)">
|
||||||
|
<path
|
||||||
|
style="font-variation-settings:normal;vector-effect:none;fill:none;fill-opacity:1;stroke:#212121;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.86;stop-color:#000000"
|
||||||
|
d="M 5,37 V -5 h 54 v 42 z"
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
id="path4087" />
|
||||||
|
<path
|
||||||
|
style="color:#000000;fill:#212121;fill-opacity:0.48;stroke-linecap:round;stroke-linejoin:round;-inkscape-stroke:none"
|
||||||
|
d="m 32,13 c -1.656786,1.66e-4 -2.999834,1.343214 -3,3 v 11 c 1.66e-4,1.656786 1.343214,2.999834 3,3 h 17 c 1.656786,-1.66e-4 2.999834,-1.343214 3,-3 V 16 c -1.66e-4,-1.656786 -1.343214,-2.999834 -3,-3 z"
|
||||||
|
id="path1776"
|
||||||
|
sodipodi:nodetypes="ccccccccc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.0 KiB |
@@ -363,9 +363,13 @@ void NodeView::Duplicate()
|
|||||||
|
|
||||||
void NodeView::SetColorLabel(int index)
|
void NodeView::SetColorLabel(int index)
|
||||||
{
|
{
|
||||||
|
MultiUndoCommand *command = new MultiUndoCommand();
|
||||||
|
|
||||||
for (Node* node : qAsConst(selected_nodes_)) {
|
for (Node* node : qAsConst(selected_nodes_)) {
|
||||||
node->SetOverrideColor(index);
|
command->add_child(new NodeOverrideColorCommand(node, index));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Core::instance()->undo_stack()->push(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeView::ZoomIn()
|
void NodeView::ZoomIn()
|
||||||
|
|||||||
@@ -43,13 +43,13 @@ void NodeViewToolBar::changeEvent(QEvent *e)
|
|||||||
void NodeViewToolBar::Retranslate()
|
void NodeViewToolBar::Retranslate()
|
||||||
{
|
{
|
||||||
add_node_btn_->setToolTip(tr("Add Node"));
|
add_node_btn_->setToolTip(tr("Add Node"));
|
||||||
minimap_btn_->setText(tr("Mini-Map"));
|
|
||||||
minimap_btn_->setToolTip(tr("Toggle Mini-Map"));
|
minimap_btn_->setToolTip(tr("Toggle Mini-Map"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeViewToolBar::UpdateIcons()
|
void NodeViewToolBar::UpdateIcons()
|
||||||
{
|
{
|
||||||
add_node_btn_->setIcon(icon::Add);
|
add_node_btn_->setIcon(icon::Add);
|
||||||
|
minimap_btn_->setIcon(icon::MiniMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,4 +171,26 @@ Project *NodeRenameCommand::GetRelevantProject() const
|
|||||||
return nodes_.isEmpty() ? nullptr : nodes_.first()->project();
|
return nodes_.isEmpty() ? nullptr : nodes_.first()->project();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NodeOverrideColorCommand::NodeOverrideColorCommand(Node *node, int index) :
|
||||||
|
node_(node),
|
||||||
|
new_index_(index)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Project *NodeOverrideColorCommand::GetRelevantProject() const
|
||||||
|
{
|
||||||
|
return node_->project();
|
||||||
|
}
|
||||||
|
|
||||||
|
void NodeOverrideColorCommand::redo()
|
||||||
|
{
|
||||||
|
old_index_ = node_->GetOverrideColor();
|
||||||
|
node_->SetOverrideColor(new_index_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void NodeOverrideColorCommand::undo()
|
||||||
|
{
|
||||||
|
node_->SetOverrideColor(old_index_);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -342,6 +342,27 @@ private:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class NodeOverrideColorCommand : public UndoCommand
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NodeOverrideColorCommand(Node *node, int index);
|
||||||
|
|
||||||
|
virtual Project * GetRelevantProject() const override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void redo() override;
|
||||||
|
|
||||||
|
virtual void undo() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Node *node_;
|
||||||
|
|
||||||
|
int old_index_;
|
||||||
|
|
||||||
|
int new_index_;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // NODEVIEWUNDO_H
|
#endif // NODEVIEWUNDO_H
|
||||||
|
|||||||
@@ -720,9 +720,13 @@ void TimelineWidget::ToggleSelectedEnabled()
|
|||||||
|
|
||||||
void TimelineWidget::SetColorLabel(int index)
|
void TimelineWidget::SetColorLabel(int index)
|
||||||
{
|
{
|
||||||
|
MultiUndoCommand *command = new MultiUndoCommand();
|
||||||
|
|
||||||
foreach (Block* b, selected_blocks_) {
|
foreach (Block* b, selected_blocks_) {
|
||||||
b->SetOverrideColor(index);
|
command->add_child(new NodeOverrideColorCommand(b, index));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Core::instance()->undo_stack()->push(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineWidget::NudgeLeft()
|
void TimelineWidget::NudgeLeft()
|
||||||
|
|||||||