mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1927 Avoid enabling of command if text is not at least 12 char long
This commit is contained in:
@@ -144,7 +144,14 @@ bool RicPasteAsciiDataToSummaryPlotFeature::hasPastedText()
|
||||
{
|
||||
QClipboard* clipboard = QApplication::clipboard();
|
||||
const QMimeData* mimeData = clipboard->mimeData();
|
||||
return mimeData->hasText();
|
||||
if (mimeData->hasText() && mimeData->text().size() > 12)
|
||||
{
|
||||
QString text = mimeData->text();
|
||||
|
||||
if (text.size() > 12) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user