performance 复制按钮
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include "Core/plottable/export.h"
|
||||
#include "Core/plot/Plot_Core_Access.h"
|
||||
#include "Core/architecture/Plot_Render_Context.h"
|
||||
#include <QClipboard>
|
||||
#include <QGuiApplication>
|
||||
#include <QPainter>
|
||||
#include <QPointer>
|
||||
#include <QResizeEvent>
|
||||
@@ -60,6 +62,9 @@ void Abs_Plot_Private::attach_widget(Abs_Plot* plot) {
|
||||
guarded_plot->update();
|
||||
});
|
||||
});
|
||||
set_performance_overlay_clipboard_callback(*core, [](std::string text) {
|
||||
QGuiApplication::clipboard()->setText(QString::fromUtf8(text.data(), static_cast<int>(text.size())));
|
||||
});
|
||||
}
|
||||
|
||||
Abs_Plot::Abs_Plot(Abs_Plot_Private* private_data)
|
||||
@@ -73,6 +78,7 @@ Abs_Plot::Abs_Plot(Abs_Plot_Private* private_data)
|
||||
Abs_Plot::~Abs_Plot() {
|
||||
if (d) {
|
||||
set_performance_overlay_update_callback(*d->core, {});
|
||||
set_performance_overlay_clipboard_callback(*d->core, {});
|
||||
d->core->deactivate_view();
|
||||
delete d;
|
||||
d = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user