Drag drop text works again
This commit is contained in:
parent
2fb56bc5c5
commit
d37f5ab26b
1 changed files with 2 additions and 1 deletions
|
|
@ -426,6 +426,7 @@ void DrawingProgram::force_rebuild_cache() {
|
|||
void DrawingProgram::drag_drop_update() {
|
||||
if(controls.cursorHoveringOverCanvas) {
|
||||
for(auto& droppedItem : world.main.input.droppedItems) {
|
||||
std::cout << "huh..." << std::endl;
|
||||
if(droppedItem.dataPath.has_value() && std::filesystem::is_regular_file(droppedItem.dataPath.value())) {
|
||||
#ifdef __EMSCRIPTEN_
|
||||
add_file_to_canvas_by_path(droppedItem.dataPath.value(), world.main.input.mouse.pos, true);
|
||||
|
|
@ -433,7 +434,7 @@ void DrawingProgram::drag_drop_update() {
|
|||
add_file_to_canvas_by_path(droppedItem.dataPath.value(), droppedItem.pos, true);
|
||||
#endif
|
||||
}
|
||||
else if(!droppedItem.dataText.has_value() && is_valid_http_url(droppedItem.dataText.value())) {
|
||||
else if(droppedItem.dataText.has_value() && is_valid_http_url(droppedItem.dataText.value())) {
|
||||
auto img(std::make_shared<DrawImage>());
|
||||
img->coords = world.drawData.cam.c;
|
||||
Vector2f imDim = Vector2f{100.0f, 100.0f};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue