Skip to content
Permalink
Browse files

GUI: make GUI_REF_SETROWCOUNT synchronous

  • Loading branch information
mrexodia committed Nov 26, 2019
1 parent 537c4e4 commit b4a03a8009d94df67367ea4f72dd2581da299247
Showing with 11 additions and 2 deletions.
  1. +1 −0 src/gui/Src/BasicView/ReferenceView.cpp
  2. +9 −2 src/gui/Src/Bridge/Bridge.cpp
  3. +1 −0 src/gui/Src/Bridge/BridgeResult.h
@@ -169,6 +169,7 @@ void ReferenceView::setRowCount(dsint count)
searchSelectionChanged(0);
emit mCountTotalLabel->setText(QString("%1").arg(count));
StdSearchListView::setRowCount(count);
Bridge::getBridge()->setResult(BridgeResult::RefSetRowCount, 1);
}

void ReferenceView::setSingleSelection(int index, bool scroll)
@@ -217,8 +217,15 @@ void* Bridge::processMessage(GUIMSG type, void* param1, void* param2)
break;

case GUI_REF_SETROWCOUNT:
emit referenceSetRowCount((dsint)param1);
break;
{
if(referenceManager->currentReferenceView())
{
BridgeResult result(BridgeResult::RefSetRowCount);
emit referenceSetRowCount((dsint)param1);
result.Wait();
}
}
break;

case GUI_REF_GETROWCOUNT:
if(referenceManager->currentReferenceView())
@@ -11,6 +11,7 @@ class BridgeResult
ScriptAdd,
ScriptMessage,
RefInitialize,
RefSetRowCount,
MenuAddToList,
MenuAdd,
MenuAddEntry,

0 comments on commit b4a03a8

Please sign in to comment.
You can’t perform that action at this time.