Added universal codebase for dragging plugin-specific presets
Added new stringPairDrag type "pluginpresetfile", allowing to drag and drop any kind of plugin-specific preset files everywhere in the program. Adopted changes in ZynAddSubFX plugin.
This commit is contained in:
@@ -291,7 +291,7 @@ void zynAddSubFxView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
QString txt = _dee->mimeData()->data(
|
||||
stringPairDrag::mimeType() );
|
||||
if( txt.section( ':', 0, 0 ) == "presetfile" )
|
||||
if( txt.section( ':', 0, 0 ) == "pluginpresetfile" )
|
||||
{
|
||||
_dee->acceptProposedAction();
|
||||
}
|
||||
@@ -313,7 +313,7 @@ void zynAddSubFxView::dropEvent( QDropEvent * _de )
|
||||
{
|
||||
const QString type = stringPairDrag::decodeKey( _de );
|
||||
const QString value = stringPairDrag::decodeValue( _de );
|
||||
if( type == "presetfile" )
|
||||
if( type == "pluginpresetfile" )
|
||||
{
|
||||
castModel<zynAddSubFx>()->loadFile( value );
|
||||
_de->accept();
|
||||
|
||||
Reference in New Issue
Block a user