From 01048057800d85b6e9a737cb0e1cd3feaede0a77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be>
Date: Tue, 25 Oct 2016 11:57:32 +0200
Subject: [PATCH] Fixes copy/pasting objects with sub dialogs

---
 include/class_CopyPasteHandler.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/class_CopyPasteHandler.inc b/include/class_CopyPasteHandler.inc
index 12c60ff37..f04d4f083 100644
--- a/include/class_CopyPasteHandler.inc
+++ b/include/class_CopyPasteHandler.inc
@@ -261,8 +261,7 @@ class CopyPasteHandler
       }
       if ($this->current) {
         $display = $this->current['object']->execute();
-        if (isset($this->current['object']->dialog) &&
-            (is_object($this->current['object']->dialog) || $this->current['object']->dialog)) {
+        if ($this->current['object']->dialogOpened()) {
           return $display;
         } else {
           // Display ok, (apply) and cancel buttons
-- 
GitLab