mirror of
https://github.com/SatDump/SatDump
synced 2026-08-13 17:47:30 -04:00
Allow setting handlers not to be draggable
This commit is contained in:
parent
5c6866a3af
commit
49d166cef1
4 changed files with 42 additions and 3 deletions
|
|
@ -41,7 +41,8 @@ namespace satdump
|
|||
h = handler;
|
||||
|
||||
// TODOREWORK CLEANUP
|
||||
if (ImGui::BeginDragDropSource(ImGuiDragDropFlags_SourceAllowNullID))
|
||||
if (handler_can_subhandlers_be_dragged && handler->handler_can_be_dragged &&
|
||||
ImGui::BeginDragDropSource(ImGuiDragDropFlags_SourceAllowNullID))
|
||||
{
|
||||
auto del = [this](std::shared_ptr<Handler> handler)
|
||||
{
|
||||
|
|
@ -55,7 +56,7 @@ namespace satdump
|
|||
ImGui::EndDragDropSource();
|
||||
}
|
||||
|
||||
if (ImGui::BeginDragDropTarget())
|
||||
if (handler->handler_can_be_dragged_to && ImGui::BeginDragDropTarget())
|
||||
{
|
||||
if (const ImGuiPayload *payload = ImGui::AcceptDragDropPayload("VIEWER_HANDLER"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue