- capi: oakengine_node_output_connection_at/_at_ex returned the source node as the connection destination; the actual destination is conn.second.node(). Out-edge enumeration was useless, so the node view could only draw in-edges and randomly lost whichever edges needed the out-edge path (random per context build order). Regression test in oakengine_node_test - project teardown: Project::clear() pre-notifies node removal while nodes are fully constructed (observers used to crash on half-destroyed nodes); childEvent suppresses the removal dance while clearing; Node::disconnect_all/disconnect_edge get a silent mode for teardown so no invalidation/events touch dying members (is_being_cleared); ClipBlock marker disconnect guarded against dead viewer/markers; ProjectCopier and PreviewAutoCacher drop project references on Project::destroyed instead of disconnecting dead objects at shutdown - preview: add oakengine_preview_request_get_audio_sample_count; the viewer queried sample count by passing nullptr to get_audio_samples which rejects it, so all playback audio was silently dropped - app: fix unterminated input-id memcpy in ResolveGroupInput (nodeparamviewitem, widgetbridge) that corrupted every parameter id - app: unsubscribe raw C-API event subscriptions in destructors of NodeParamViewKeyframeControl, NodeParamViewConnectedLabel and ExportDialog; playhead events used to fire into dead widgets (crash when dragging the playhead) - tests: preview request roundtrip (video frame + audio range) and free-while-active teardown coverage; env-gated OAK_DEBUG_EDGES / OAK_DEBUG_INVALID_INPUT diagnostics - docs: investigation notes in docs/zh/
84 lines
1.9 KiB
C++
84 lines
1.9 KiB
C++
/***
|
|
|
|
Olive - Non-Linear Video Editor
|
|
Copyright (C) 2022 Olive Team
|
|
Modifications Copyright (C) 2025 mikesolar
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
***/
|
|
|
|
#ifndef OAK_NODEPARAMVIEWCONNECTEDLABEL_H
|
|
#define OAK_NODEPARAMVIEWCONNECTEDLABEL_H
|
|
|
|
#include "engineeventbridge.h"
|
|
#include "oakutil/oaknode.h"
|
|
#include "widget/clickablelabel/clickablelabel.h"
|
|
#include "widget/nodevaluetree/nodevaluetree.h"
|
|
|
|
#include <cstdint>
|
|
|
|
namespace olive
|
|
{
|
|
|
|
class NodeParamViewConnectedLabel : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
NodeParamViewConnectedLabel(const oak::Input &input,
|
|
QWidget *parent = nullptr);
|
|
~NodeParamViewConnectedLabel() override;
|
|
|
|
void set_viewer_node(OakEngineNode *viewer);
|
|
|
|
signals:
|
|
void request_select_node(OakEngineNode *n);
|
|
|
|
private slots:
|
|
void input_connected(oak::Node output, const oak::Input &input);
|
|
|
|
void input_disconnected(oak::Node output, const oak::Input &input);
|
|
|
|
void show_label_context_menu();
|
|
|
|
void connection_clicked();
|
|
|
|
private:
|
|
void update_label();
|
|
|
|
void update_value_tree();
|
|
|
|
void create_tree();
|
|
|
|
ClickableLabel *connected_to_lbl_;
|
|
|
|
oak::Input input_;
|
|
|
|
oak::Node connected_node_;
|
|
|
|
NodeValueTree *value_tree_;
|
|
|
|
OakEngineNode *viewer_;
|
|
|
|
EngineEventBridge *bridge_ = nullptr;
|
|
|
|
int64_t viewer_sub_ = 0;
|
|
|
|
private slots:
|
|
void set_value_tree_visible(bool e);
|
|
};
|
|
|
|
}
|
|
|
|
#endif // OAK_NODEPARAMVIEWCONNECTEDLABEL_H
|