]> git.lyx.org Git - features.git/commitdiff
Oops, asInsetGrpahics is new to master.
authorPavel Sanda <sanda@lyx.org>
Thu, 15 Feb 2018 20:48:23 +0000 (21:48 +0100)
committerPavel Sanda <sanda@lyx.org>
Thu, 15 Feb 2018 20:48:23 +0000 (21:48 +0100)
src/BufferView.cpp

index 5e5f1bc40a6d2ca7c2eb975ecd7a6baa8fcbc708..e23883cd069d4a23d77a3c2d63640d8a3d400418 100644 (file)
@@ -1681,15 +1681,15 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                        Inset * inset = from.nextInset();
                        if (!inset)
                                break;
-                       InsetGraphics * ig = inset->asInsetGraphics();
-                       if (ig) {
-                               InsetGraphicsParams inspar = ig->getParams();
+                       if (inset->lyxCode() == GRAPHICS_CODE) {
+                       InsetGraphics & ig = static_cast<InsetGraphics &>(*inset);
+                               InsetGraphicsParams inspar = ig.getParams();
                                if (fetchId) {
                                        grp_par = inspar;
                                        fetchId = false;
                                } else {
                                        grp_par.filename = inspar.filename;
-                                       ig->setParams(grp_par);
+                                       ig.setParams(grp_par);
                                }
                        }
                        from.forwardInset();