FIND A BUG IN PASTE component FROM MOUSE

Home Forums General Programming FIND A BUG IN PASTE component FROM MOUSE

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26842
    kamder
    Participant
      • Topics: 9
      • Replies: 13
      • Total: 22

      hello atom i found a problem when i copy a component with mouse “copy” and when i paste it (with mouse ) it keep the same vst index number , i d’ont know if it’s normal …..
      when i copy the same component with the menu on the top “edit” “copy” and “edit” “paste” the vst number change ………..

      according to this i have added that line in ctrlpanelcanvas.cpp :

      void CtrlrPanelCanvas::editMenuPaste(const MouseEvent &e)
      {

      ValueTree clipboardTree = valueTreeFromXml (SystemClipboard::getTextFromClipboard());
      if (clipboardTree.hasType (Ids::uiPanelClipboardTree))
      {
      emptyGroupping (clipboardTree);

      Rectangle list = VAR2RECT (clipboardTree.getProperty(“selectionRect”));
      const int deltaX = e.x – list.getX();
      const int deltaY = e.y – list.getY();

      for (int i=0; isetTopLeftPosition (c->getX()+deltaX, c->getY()+deltaY);
      ///////////////////////KAMDER ADD THIS FROM THE PASTE EDIT MENU ///////////////////////////////////////
      c->getOwner().setProperty (Ids::vstIndex, owner.getOwner().getOwner().getVstManager().getFirstFree());
      ///////////////////////////////////////////////////////////////////////////////////////////////////////
      }
      }

      enjoy the fix !!!!!!!

      #26844
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        Thank you, added.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • The forum ‘Programming’ is closed to new topics and replies.
      There is currently 0 users and 56 guests online
      No users are currently active
      Forum Statistics
      Threads: 2,495, Posts: 17,374, Members: 77,605
      Most users ever online was 12 on January 22, 2019 3:47 pm
      Ctrlr