diff --git a/src/prefs/ExtImportPrefs.cpp b/src/prefs/ExtImportPrefs.cpp index b7381cc9e..1ce8b566e 100644 --- a/src/prefs/ExtImportPrefs.cpp +++ b/src/prefs/ExtImportPrefs.cpp @@ -113,7 +113,9 @@ void ExtImportPrefs::PopulateOrExchange(ShuttleGui & S) #endif RuleTable->SetRowLabelSize (0); RuleTable->SetSelectionMode (wxGrid::wxGridSelectRows); - RuleTable->AutoSizeColumns (); + // call SetMinSize to enable scrolling on large content + RuleTable->Fit(); + RuleTable->SetMinSize(RuleTable->GetSize()); ExtImportPrefsDropTarget *dragtarget1 {}; RuleTable->SetDropTarget ( @@ -330,7 +332,7 @@ void ExtImportPrefs::OnPluginBeginDrag(wxListEvent& WXUNUSED(event)) dragtext2->SetText(wxT("")); dragSource.SetData(*dragtext2); mDragFocus = PluginList; - wxDragResult result = dragSource.DoDragDrop(TRUE); + wxDragResult result = dragSource.DoDragDrop(wxDrag_DefaultMove); mDragFocus = NULL; switch (result) { @@ -644,7 +646,7 @@ void ExtImportPrefs::OnRuleTableCellClick (wxGridEvent& event) dragtext1->SetText(wxT("")); dragSource.SetData(*dragtext1); mDragFocus = RuleTable; - wxDragResult result = dragSource.DoDragDrop(TRUE); + wxDragResult result = dragSource.DoDragDrop(wxDrag_DefaultMove); mDragFocus = NULL; switch (result) { @@ -711,8 +713,8 @@ bool ExtImportPrefsDropTarget::OnDrop(wxCoord x, wxCoord y) Grid *RuleTable = mPrefs->GetRuleTable(); if (mPrefs->GetDragFocus() == RuleTable) { - if (RuleTable->YToRow (y - - RuleTable->GetColLabelSize ()) == wxNOT_FOUND) + if (RuleTable->YToRow( + RuleTable->CalcUnscrolledPosition(wxPoint(x, y)).y) == wxNOT_FOUND) return false; } else if (mPrefs->GetDragFocus() == PluginList) @@ -746,8 +748,7 @@ wxDragResult ExtImportPrefsDropTarget::OnDragOver(wxCoord x, wxCoord y, if (mPrefs->GetDragFocus() == RuleTable) { int row; - row = RuleTable->YToRow (y - - RuleTable->GetColLabelSize ()); + row = RuleTable->YToRow(RuleTable->CalcUnscrolledPosition(wxPoint(x, y)).y); if (row == wxNOT_FOUND) return wxDragNone; @@ -785,7 +786,7 @@ wxDragResult ExtImportPrefsDropTarget::OnDragOver(wxCoord x, wxCoord y, wxLIST_STATE_SELECTED); } } - return wxDragCopy; + return wxDragMove; } void ExtImportPrefsDropTarget::OnLeave()